I have a Delphi XE2 application which currently connects to a MySQL 5.5 database sever.
To convert this application to using MySQL embedded ie libmysqld.dll I have followed these steps ...
On the main form the TMyConnection component has been replaced with a TMyEmbConnection with the new settings for data locations and the installation set up as described at ... https://www.devart.com/dotconnect/mysql ... erver.html but adapted to the Delphi language. The MySQL server service has been stopped.
When the application runs there is an error message ...
"A call to an mysql_server_init failed.
C:\Users\<username>\AppData\Roaming\MySQL\.mylogin.cnf - The system cannot find the file specified"
I cannot find any mention of this cnf file being required or how to set it up.
It seems superfluous as all the server connection details are provided in the TMyEmbConnection component.
Can anyone assist with getting this running.
Thanks
Delphi Application - Conversion to Embedded MySQL
-
- Posts: 1
- Joined: Fri 27 Jul 2018 21:55
Re: Delphi Application - Conversion to Embedded MySQL
MyDAC doesn't deploy any MySQL Embedded server library. To work with the Embedded server you should copy needed libmysqld.dll and the "Share" directory from the MySQL server directory to the directory with your application. This library is different for 32-bit and 64-bit application and it is supplied with MySQL server.
To solve the issue try setting the MySQLEmbDisableEventLog variable to True in the initialization section of one of the units in your project.
Note that to run this code, you should add the Uni and MySQLApi unit to the USES clause of your unit.
To solve the issue try setting the MySQLEmbDisableEventLog variable to True in the initialization section of one of the units in your project.
Code: Select all
initialization
MySQLApi.MySQLEmbDisableEventLog := True;