Page 1 of 1
Problems with embedded mysql.
Posted: 21.07.2012, 07:15
by guidaenzo
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
Posted: 21.07.2012, 20:19
by EgonHugeist
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
Posted: 23.07.2012, 08:33
by guidaenzo
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.
Posted: 23.07.2012, 08:38
by guidaenzo
The problem occurs even if I click on the catalog properties of the object inspector.
Posted: 23.07.2012, 09:19
by EgonHugeist
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
Posted: 23.07.2012, 18:36
by guidaenzo
If you assign the connection fields @runtime not works perfectly.
I try to update lazarus and install version 7 of zeoslib.
Posted: 23.07.2012, 19:54
by guidaenzo
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.
Posted: 23.07.2012, 21:06
by guidaenzo
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.
Posted: 24.07.2012, 15:08
by EgonHugeist
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
Posted: 09.10.2012, 00:27
by mdaems
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
Posted: 11.10.2012, 19:05
by Pitfiend
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.