Delphi 2007 and problem with MySQL's DLL

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
inetMark
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 19.03.2008, 18:57

Delphi 2007 and problem with MySQL's DLL

Post 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.
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Try to copy it to the application path. Could still not work in design time, but in runtime it should work.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
inetMark
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 19.03.2008, 18:57

Post 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:
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
Post Reply