Page 1 of 1

Embedded server question

Posted: Mon 14 Feb 2005 11:15
by japi
Hi,

I try the embedded server example and createtd the file C:\windows\my.ini with this values:
[Embedded.exe]
datadir=C:/Borland/Delphi6/MyDac/Demos/Embedded/data
basedir=C:/Borland/Delphi6/MyDac/Demos/Embedded/

But I cannot connect.
In the help file there is also a [embedded] option, what values can I use there ?

When I change the ini file to a exsisting database like this:
datadir=c:/MySQL/data/
basedir=c:/MySQL

then i also cannot connect.

I use Delphi 6 and MySQL server 4.1

Thanks,
Jan

Posted: Tue 15 Feb 2005 07:19
by Ikar
What exact version of MySQL do you use (4.1.X)?
What is the version of MyDAC that you use (3.50.X.XX)?

Please specify in what an impossibility to establish a connection is expressed.

Posted: Tue 15 Feb 2005 09:54
by Guest
MySql 4.1.9-nt-max via TCP/IP
MyDac version 3.50.0.16 21.01.05 (trial version)

And the error in the logfile is:
050215 10:47:12 [ERROR] Can't init databases
The error in the app is: A call to mysql_server_init() failed.

By the way, I have thesame error when I try it with C++Builder 5 and I stopped first the MySQL service on my develop machine.

Thanks,
Jan

Posted: Tue 15 Feb 2005 13:56
by Ikar
By this message, MySQL Server couldn't find folder with databases or they are out-of-order. Could you use usual 4.1.9 server with the same settings (datadir, basedir)?

Posted: Tue 15 Feb 2005 14:58
by japi
Yes, when i start the MySQL service then I have acces to the database and tables. Also from the MySQL prompt. When I stop the service and try to get acces through the embedded server then I get the above situation.

Jan

Posted: Wed 16 Feb 2005 08:53
by Ikar
Do both these servers have the same version number and were compiled standardly in MySQL AB?

Please send us your My.ini file.

Posted: Thu 17 Feb 2005 19:50
by japi
Yes, the have identical version numbers.
I don 't have recompiled the source of MySQL if that is what you ment. I just installed MySQL from the binarie download.

This is the My.ini file in C:\Windows

[Embedded.exe]
datadir=C:\mysql\data
basedir=c:\MySQL


Jan

Posted: Fri 18 Feb 2005 10:18
by Ikar
Are there the only rows in My.ini, or there are another?

Posted: Fri 18 Feb 2005 11:03
by japi
Yes.
I have copied the app to C:\MySQL and the database to C:\MySQL\Data

By default the application is located in:
C:/Borland/Delphi6/MyDac/Demos/Embedded

so I have changed to this:
[Embedded.exe]
datadir=C:/Borland/Delphi6/MyDac/Demos/Embedded/data
basedir=C:/Borland/Delphi6/MyDac/Demos/Embedded

But the same problem.

Must I added extra lines to the my.ini file ?

Jan

Posted: Mon 21 Feb 2005 08:32
by alec
copy libmysqld.dll (from [mysql]\embedded\dll\release) to C:/Borland/Delphi6/MyDac/Demos/Embedded
also copy [mysql]/share/charsets frolder to C:/Borland/Delphi6/MyDac/Demos/Embedded/share/ if you want use another charset

Posted: Mon 21 Feb 2005 10:14
by Ikar
Try to clear temporarily datadir folder.

Posted: Mon 24 Oct 2005 04:26
by ManUtd
How do I know where is the temp data directory ?