connection to mysql ebedded

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Josef Koller
Junior Boarder
Junior Boarder
Posts: 26
Joined: 04.09.2005, 14:46

connection to mysql ebedded

Post by Josef Koller »

Hi,

its crazy, I search and read ant test and search and read and test .....
a connection to mysqlebedded. And ... no success.

Ma latest steps:
I go back to mysql Version 4.1.22. Here I got a directory named "embedded". Under embedded are two directories: debug and release. In both are three files:libmysqld.dll,exp and libmysqld.lib.

Perfect Ithought Here are my dll file.

Than a created a new directory on my Computer C:\testmysql. In this directory I copied the founded libmysqld.dll at first this one founded in the folder debug. than I copied the hole database directory from my server enirenment "data\imkerei_v4" to c:\testmysql.

Than I started a new project with Delphi (Vers. 6). Only a form a z connection a ztable a datasource and a grid.

Than I wrote the direct path to the ZConnection Database Property:
- C:\testmysql\data\imkerei_v4.
- Property Protocol: mysqld-4.1

That's all.

And I get an access violation in modul "libmysqld.dll".

Can anybody help me to get a connection to this "direkt database " in my testfolder?

thanks

Josef
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 Josef,

Did you read the MySQL.Readme1st.txt in the examples/embedded folder? There's a good introduction.

I'm running the full test suite against an embedded mysql server, so it definitely works. Please let me know when you don't get it working. Probably it's only some necessary files that are missing. (Like the share directory)

Oh ... I see you use a full path as database property. Just use 'imkerei_v4' instead. Probably that alone won't fix the problem, but it's wrong anyway.

Mark
Image
Josef Koller
Junior Boarder
Junior Boarder
Posts: 26
Joined: 04.09.2005, 14:46

Post by Josef Koller »

Hi mark,

in my installation isn't a mysql readme1st.txt. So I will tell you me introduction in short words:

I have a xammp apache installation an my computer. In this directory I deleted the actual mysql Version and copied a 3. ... mysql Version. In this version I have an embedded directory with a libmysqld.dll. In the normal xampp installation i have had no embedded directory.

Ok. The server version of mysql works fine. Also with zeos components.

But I would like to create an database application with mysql database in desktop version. Like a firebird version.

In a firebird application i give the gd32.dll to the app folder rename it to fbclient.dll and the application works with the database in this application folder.

So I will do the same with mysql.

The background:
I would like to give the application per installation script to others. And this people need a database to work with the application. So my idea: database in the appfolder and connection with Zeos to this database.

Can you tell me what I have to do?

Thanks again

Josef
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, the file should be in the zeoslib distribution directory: examples\embedded\MySQL.Readme1st.txt . (So not in the mysql distribution) I'll attach a copy...

Did you copy the 'share' folder from the mysql installation in your app folder?

Why are you using mysql 3.X? There's a libmysqld.dll in the 5.1 release too.

Mark
You do not have the required permissions to view the files attached to this post.
Image
Josef Koller
Junior Boarder
Junior Boarder
Posts: 26
Joined: 04.09.2005, 14:46

Post by Josef Koller »

Hi,
thanks for the file and the hint.

Now I have mysql version 4. And I tested again.

First I toke a look to your example and your Readme1st. Thanks for the file.

Than I tested your demo app. Here is the first problem. I get no datas to the grid by clicking 'Open'. Acess violation .... .

The application stops in the:

contrucotr TZMySQLResultSet ...... after line
FUseResult := UseResult;
Open; <--- here

But I have now the parameters in for the connection property. so I started my own test project again.

I gave the parameters (
compress=yes
dbless=no
useresult=no
timeout=30
ServerArgument1=--basedir=./
ServerArgument2=--datadir=./data
ServerArgument3=--character-sets-dir=./share/charsets
ServerArgument4=--language=./share/english
ServerArgument5=--skip-innodb
ServerArgument6=--key_buffer_size=32M
to my connection.

Than I created a database with a zquery (create database). That works.
Than I created a table with a zquery (create table ......). That works, too.
Than I created an insert with a zquery (insert into .....). That works; too.

But if I would like to see the results I got in my testapplication the same error like in yours.

Access violation.....

I started a zquery with select * from tb_test at runtime in CreateEvent with zquery1.execsql.

What I have to do to get a result?!?!

And by the way in designtime with table1 for example I cann't set the active to true. I get the same error "access violation ... (see on top).

The same in runtime.

I hope you can help me again
thanks

Josef
Josef Koller
Junior Boarder
Junior Boarder
Posts: 26
Joined: 04.09.2005, 14:46

Post by Josef Koller »

Hi Mark,

after updating my zeos components to version 664 it works.

Thanks a lot for help.

Josef
sandro.carrara
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 25.02.2009, 09:21

Connection to MySQL 5.1.3

Post by sandro.carrara »

Using Zeos 6.6.4 with libmysqld.dll (release 5.1.3.1) on Delphi 7 I have the following error:
Access violation at.......

line 3617 in unit ZPlainMysqlDriver

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

Post by mdaems »

What mysqld version is it exactly you're using? 5.1.3.1 isn't an official mysql release number.
The error occurs on initializing the server. So the problem may be related to the availability of the necessary files/directories. Did you read the information in the examples/embedded directory (zeoslib distro)?

Mark
Image
sandro.carrara
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 25.02.2009, 09:21

Post by sandro.carrara »

Thanks Mark

MySQL 5.1.3.1 is the latest release available, I've downloaded it yesterday following the suggestion of MySQL assistence due to a problem with the triggers on embedded version.

The date on the library is 23/01/2009, the size 6.377.472 Bytes.

I read the information in the examples/embedded directory (zeoslib distro) and the olders version of the library work fine.

I've tried to send you the library but there are problems with the connection.

Bye
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 Sandro,
You can send your sample to zeoslib at gmail point com or host it yourself and post us a link.
I need : the full project directory, except for the compilation results (dcu, exe) but including data dir, dll, shared dir, ...

I suppose you're referring to the 5.1.31 official release (without the dot between 3 and 1)? Or was it a special build made for you? In that case the include directory of your version might prove useful too. (imagine someone changed the interface records...) Was the previous dll you tried also from the 5.1 series? Which one?

Mark
Image
sandro.carrara
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 25.02.2009, 09:21

Post by sandro.carrara »

Sorry Mark, you're right, the correct version is 5.1.31.

I've prepared a little project for MySQL support because I've a problem with embedded version and a database using triggers.
We've tried to update the project to MySQL 5.1.31 but with the new library I have the problem showed.

The link of the project is:

www.elaborasvilupposoftware.it/download/test embedded.zip


Thanks
sandro.carrara
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 25.02.2009, 09:21

Post by sandro.carrara »

Problem due to an old version of errmsg.sys.
All works rigth.

Thaneks
Post Reply