Embedded server question

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
japi
Posts: 7
Joined: Mon 14 Feb 2005 09:25
Location: Belgium

Embedded server question

Post by japi » Mon 14 Feb 2005 11:15

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

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 15 Feb 2005 07:19

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.

Guest

Post by Guest » Tue 15 Feb 2005 09:54

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

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 15 Feb 2005 13:56

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)?

japi
Posts: 7
Joined: Mon 14 Feb 2005 09:25
Location: Belgium

Post by japi » Tue 15 Feb 2005 14:58

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

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 16 Feb 2005 08:53

Do both these servers have the same version number and were compiled standardly in MySQL AB?

Please send us your My.ini file.

japi
Posts: 7
Joined: Mon 14 Feb 2005 09:25
Location: Belgium

Post by japi » Thu 17 Feb 2005 19:50

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

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 18 Feb 2005 10:18

Are there the only rows in My.ini, or there are another?

japi
Posts: 7
Joined: Mon 14 Feb 2005 09:25
Location: Belgium

Post by japi » Fri 18 Feb 2005 11:03

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

alec

Post by alec » Mon 21 Feb 2005 08:32

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

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 21 Feb 2005 10:14

Try to clear temporarily datadir folder.

ManUtd
Posts: 24
Joined: Thu 20 Oct 2005 02:48

Post by ManUtd » Mon 24 Oct 2005 04:26

How do I know where is the temp data directory ?

Post Reply