Page 1 of 1
trying embedded demo
Posted: Fri 05 Jul 2013 14:44
by dragonstar
I'm trying to get the embedded demo to work.
I have the brand newest MyDac installed as of this morning.
I'm devloping 32-bit apps using Delphi 7 under Windows 7 Ultimate 64-bit.
Based on a posting in this forum I'm using the 32-bit libmysql.dll from the Mysql 5.6.10 release.
When I click the Open button it says a call to mysql_server_init has failed and claims it can't find file "mylogin.cnf".
I've had this demo working with previous MyDac editions and it's never needed this file which by the way doesn't exist and never had existed on my coding machine - what am I doing wrong and/or what do I have to do to get this to work again?
drc

Re: trying embedded demo
Posted: Fri 05 Jul 2013 14:52
by dragonstar
FOLLOW UP
It's looking for the .cnf file in my user folder\appdata\roaming\mysql
The same error dialog is also looking for additional files where "data" is the name of the data directory...
...data\mysql.sym
...data\mysql\plugin.frm
...data\mysql.sym ** yes a second time for this file
...data\ibdata1
.\undo001
What the heck are all these?, why does it need them when the demo never did before?, and where do I get them if I have to have them?
drc

Re: trying embedded demo
Posted: Mon 08 Jul 2013 09:24
by DemetrionQ
Hello.
Minimum requirements for work with MySQL Embedded server:
- the libmysqld.dll and share\english\errmsg.sys files must be of the same version;
- when working with MySQL Embedded version 5.6.x, the MySqlApi unit should be added to the uses clause, and the MySQLEmbDisableEventLog global variable must be set to True before opening a connection, e.g., as follows:
Code: Select all
uses MySqlApi ...
...
MySQLEmbDisableEventLog := True;
MyEmbConnection1.Open;
You can find more information about work with MySQL Embedded Server here:
http://www.devart.com/mydac/docs/usinge ... server.htm
Re: trying embedded demo
Posted: Thu 20 Mar 2014 01:49
by skydvrz
I have the same problem - I cannot get the Embedded (v8.2.5) demo to work and you may need to update your installation instructions for recent versions of MySQL / libmysqld.dll.
I am using DXE UD1.
I think there may be both 32 and 64 bit versions of the DLL. If you use 64-bit with a 32 bit app, the demo will not run at all. The demo complains about missing DLLs when that is clearly not the case.
I found a 32-bit v5.6 DLL and used that with the demo and got a bit further. The DLL is not marked in any way as to it's "bitness", but I noticed that they have different file sizes.
I think there are several files you have to copy over from an existing MySQL Server install. The demo complains about missing plugin.frm, plugin.MYD and plugin.MYI from the data/mysql directory.
I copied those over. There may be others - I didn't get very far.
I added the "MySQLEmbDisableEventLog := True;" at the top of FormCreate - The demo opens the connection automatically in MyTable.Open so I would think that putting it just above the MyConnection.Open call is way too late.
MySQLEmbDisableEventLog has no effect on the demo, since it is already set to True at startup. Something else is wrong.
I launched the demo and clicked the Open button.
The demo creates ib_logfile0, ib_logfile1, ibdata1 and then dies when it cannot find ./undo001.
If you try to run the demo a second time, it crashes, complaining about ibdata1: "A call to an mysql_server_init failed C:\lib\devart\mydac for RAD Studio\XE\Demos\TechnologySpecific\Embedded\data\ibdata1 - The file exists .\undo001 - The system cannot find the file specified.
Maybe there is a different mechanism for shutting off logging in MySQL's libmysqld.dll v5.6?
I creating a zero-byte undo001 file - it did not help.
Any help would be greatly appreciated. I really need to get this working for a new project.
TIA!
Kevin G. McCoy
Re: trying embedded demo
Posted: Fri 21 Mar 2014 23:13
by skydvrz
Can I get some help here?
Re: trying embedded demo
Posted: Mon 24 Mar 2014 09:25
by Dimon
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.
We cannot reproduce the problem using our Embedded demo. Please describe exact steps to reproduce the problem and specify exact version of libmysqld.dll used.