Problems with embedded mysql.

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

guidaenzo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 21.07.2012, 06:07

Problems with embedded mysql.

Postby guidaenzo » 21.07.2012, 07:15

I have a problem with embedded mysql

MY SETUP
Windows 7 32bit
lazarus 0.9.30.2
zeoslib ZEOSDBO-6.6.6-stable
mysql- 5.5.25a.0
libmysqld.dll copy to windows/system/ folder

1)
At designetime
I added the component zcomponent in the form
set the protocol property on mysqld-5

When I set the connected property to true lazarus crash and close it, without error messages.

2)
At designetime
I added the component zcomponent in the form
set the protocol property on mysqld-5

procedure TForm1.FormCreate(Sender: TObject);
begin
zconnection2.Connected:=true;
end;

Run application.

The build of the project has been completed successfully, but when execute it the application closes immediately.

The problem occurs only with protocol property on mysqld-5.

I hope you can help

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 21.07.2012, 20:19

guidaenzo,

did you set all server arguments?

Like these:
ServerArgument1=--basedir=./
ServerArgument2=--datadir=./data
ServerArgument3=--character-sets-dir=./share/charsets
ServerArgument4=--language=./share/english
ServerArgument5=--skip-innodb
ServerArgument6=--key_buffer_size=32M


Michael
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image

guidaenzo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 21.07.2012, 06:07

Postby guidaenzo » 23.07.2012, 08:33

these are the settings zconnect:

database -> mysql
username -> ''
password -> ''
hostname ->''
properties->
ServerArgument1=--basedir=./
ServerArgument2=--datadir=./data
ServerArgument3=--character-sets-dir=./share/charsets
ServerArgument4=--language=./share/english
ServerArgument5=--skip-innodb
ServerArgument6=--key_buffer_size=32M

in the application folder I copied the Folder share which contains two folder
charset and english.

the problem persists with no error message.

When I set the connected property to true lazarus crash and close it.

guidaenzo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 21.07.2012, 06:07

Postby guidaenzo » 23.07.2012, 08:38

The problem occurs even if I click on the catalog properties of the object inspector.

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 23.07.2012, 09:19

guidaenzo,

Issues i see @designtime:

The embedded driver expects now the share and data directory in the folder (bpl-dir)\data etc. Which means you have to copy these files to the folder where Lazarus expects the compiled packages.

What i don't like is that there is no exception raised. IDE issues? Hmm i don't know.

If you assign the connection fields @runtime it works perfectly, or am i wrong?

Btw. Switch to Zeos7 from SVN then you can upgrade your LCL and FPC. Z7 is FPC stable. Trust me on that.

Michael
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image

guidaenzo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 21.07.2012, 06:07

Postby guidaenzo » 23.07.2012, 18:36

If you assign the connection fields @runtime not works perfectly.

I try to update lazarus and install version 7 of zeoslib.

guidaenzo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 21.07.2012, 06:07

Postby guidaenzo » 23.07.2012, 19:54

Then I installed the latest version of lazarus and zeoslib-trunk.
The installation was successful.
But I have the same problem at both designtime it at runtime.
The application quits.

guidaenzo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 21.07.2012, 06:07

Postby guidaenzo » 23.07.2012, 21:06

The library libmysqld.dll 5.5.25a.0 version is not supported.
I installed version 5 and it works only at runtime.
In Designetime does not work.
Thanks a lot anyway.

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 24.07.2012, 15:08

guidaenzo,

i wish i could help you right now. I know the project-manager does run also the embedded tests. So they are working but i can not really say what your issue is.

Another thing do you set CodePage=UTF8?

If 'yes' then you need to copy the UTF8 characters too.

Michael
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image

User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Postby mdaems » 09.10.2012, 00:27

Well, I'm running an old version. So I don't dare saying it works with mysql 5.5 embedded libraries...
Setting this up isn't an easy job unfortunately. Which is why I avoid upgrading my embedded test servers too. Chances are some settings have been changed between mysql versions or they have been removed. Reading the mysql docs on the C API and the Embedded server API may help.
Always keep in mind direcory settings are interpreted relative to the working directory of the running executable.

Mark
Image

User avatar
Pitfiend
Senior Boarder
Senior Boarder
Posts: 65
Joined: 12.12.2009, 07:27

Postby Pitfiend » 11.10.2012, 19:05

I had this problem too, long time ago. My solution was to put the share and data folders in the same folder as the application and the dynamic library. You must set the database parameters accordingly to point to the right paths. In the data folder you must have a mysql folder containing this tables time_zone, time_zone_leap_second, time_zone_name, time_zone_transition and time_zone_transition_type (no need to have data, empty structure works fine, you can copy them from distro pkg, be aware that there are 3 files for each table *.frm, *.myd, *.myi you need all of them), your databases will be there too; in the share folder you must have at least charsets and english folders (I also suggest you to copy them from distro pkg as they are) and any other language you will use. I think that will solve your troubles.


Return to “MySQL”

Who is online

Users browsing this forum: No registered users and 1 guest