Page 1 of 1

Delphi 2007 and problem with MySQL's DLL

Posted: 19.03.2008, 22:46
by inetMark
At first - sorry about my english.

I have problem with create connection to my MySQL server.

This is very simple code in my test program

Code: Select all

ZConnection1.HostName := '192.168.1.57';
ZConnection1.User := 'my_user';
ZConnection1.Password := 'my_pass';
ZConnection1.Port := 3306;
ZConnection1.Protocol := 'mysqld-5';
ZConnection1.Connect;
and I can see only this error message (after button click)
Image

This problem is in Windows Vista 64bit and Windows XP SP2.
I was try copy DLL file to the program directory and to Windows\system32 directory, but it still doesn't works.

(I used DLL from ZEOSDBO-6.6.1-beta because in ZEOSDBO-6.6.2-rc I not found DLL files.)

Thanks for any help and advice.

Posted: 20.03.2008, 08:47
by zippo
Try to copy it to the application path. Could still not work in design time, but in runtime it should work.

Posted: 20.03.2008, 08:57
by mdaems
Hi inetMark,

I hope you are aware that you are using the embedded server library? As you are connecting to an external server this isn't necessary. (Unless you know hat you are doing and also want to be able to use an embedded database later on)
For non-embedded : use protocol mysql-5 and libmysql50.dll. (the d stands for embedded)
If you do want to use embedded please read the 'examples\embedded\MySQL.Readme1st.txt' first. Because in that case just copying the dll will not be sufficient.

Success.

Mark

Posted: 20.03.2008, 09:46
by inetMark
Thanks for advices.

to zippo:
I copied these files into application directory at first and after that I copied files into System32.

to mdaems:
I am beginner and I don't know what does 'MySQL Embedded server' mean.
I have installed XAMPP 1.6.3a on my server (phpmyadmin, apache, mysql - all in one). I use application via network from my computer.

Now, I will try to read MySQL.Readme1st.txt.


EDIT:
OK. Thanks. Problem was solved.
ZConnection1.Protocol := 'mysql-5'; //this is what I need
:oops:

Posted: 21.03.2008, 11:54
by mdaems
"Mysql embedded server" means you can have a mysql server running as part of your program. Eg, when the data is private to your application you don't need a seperate server process to keep it.

Have a look at the mysql documentation to learn more about it's limitations. But using it is as simple as choosing a different protocol and making sure to read the example.

Mark