Page 1 of 1

embedded server

Posted: Thu 13 Dec 2007 13:21
by sasbs
I tried to use the embedded server but I get the following message when I try to open the connection:

Eine nicht behandelte Ausnahme des Typs "System.AccessViolationException" ist in CoreLab.MySql.dll aufgetreten.

Zusätzliche Informationen: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.

I work with mysql 5.1 and the trial version of MyDirect.

Thanks in advance

Posted: Thu 13 Dec 2007 14:53
by Serious
Embedded server has known problems in the 5.1 version. Also it is not part of the MySQL 5.0, so only 4.1 version is currently supported. MySQL support says that it will be included in future versions, starting with MySQL 5.1

Posted: Fri 14 Dec 2007 09:52
by sasbs
Ok, now I have installed MySQL 4.1.

Still the same error
Eine nicht behandelte Ausnahme des Typs "System.AccessViolationException" ist in CoreLab.MySql.dll aufgetreten.

Zusätzliche Informationen: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
What can I do?

Posted: Sat 22 Dec 2007 12:35
by Alexey.mdr
You are receiving this error message because the connection settings are not valid.

Try the following steps:
1. Install MySQL server 4.1.* (you have already done this)
2. Create a directory for your embedded server. This will be your "basedir" directory.
3. Make sure you have "libmysqld.dll" in "windows/system32" folder. (You can copy the library from the MySQL server installation)
4. Restart Visual Studio if you have had it running.
5. Copy "share" folder from the server installation to the "basedir".
6. Create folder for the data inside the "basedir" folder. This is your "datadir" directory. You may copy here "mysql" folder from your server installation.
7. Create "my.ini" file in "windows" folder.
8. You may add something like this into "my.ini" file:

Code: Select all

[embedded]
basedir=c:/servers/embedded/                                
datadir=c:/servers/embedded/data/			    
You may change the path and add other configuration parameters.

9. Now you can use the embedded server. This is an example of connection string:

Code: Select all

"User Id=root; Server Parameters=\"--basedir=c:/servers/embedded/;--datadir=c:/servers/embedded/data/;\"; Embedded=True;"
Additionally, you may read "Embedded Server and MyDirect .NET" topic in the product documentation.

Posted: Tue 25 Dec 2007 12:40
by Alexey.mdr
We have tested MyDirect .NET with MySQL Embedded server 4.1.22 and fixed several bugs. Look forward to the next build.