Board index » delphi » MySql - newbie Q.: "Unable to Load LIBMYSQL.dll"

MySql - newbie Q.: "Unable to Load LIBMYSQL.dll"


2004-11-07 10:10:45 PM
delphi37
Delphi/6
Win2000
I've installed mySQL (as a service), I can see mysqld-nt.exe in
TaskManager, and running
mysqlshow mysql -u root -p
returns a list of tables in the standard mysql database (after prompting
for the password).
Starting with File|New|Application, I placed a TSQLConnection
(dbExpress) component on the form and filled in some fields in the
Params property. This is how it looks:
object cnTEST: TSQLConnection
ConnectionName = 'MSConnection'
DriverName = 'MYSQL'
GetDriverFunc = 'getSQLDriverMYSQL'
LibraryName = 'dbexpmys.dll'
Params.Strings = (
'BlobSize=-1'
'Database=mysql'
'DriverName=MYSQL'
'ErrorResourceFile='
'HostName=localhost'
'LocaleCode=0000'
'Password=abcxyz'
'User_Name=root')
VendorLib = 'LIBMYSQL.dll'
end
This is meant to connect to the database (mysql) I tested with mysqlshow
above.
When I try to set the "Connected" property to true, I get an error:
Unable to Load LIBMYSQL.dll
LIBMYSQL.dll resides on the folder where it was installed, and I have also
tried to copy it to WINNT, WINNT/system32 and the folder of the new app.
Still the same error.
Any hints?
I've downloaded a trial version og mysqldac (not installed yet) - will
this make life easier? Any recommendations for a set of components?
I will just use this to transfer some data from another database -
nothing advanced at all.
TiA
Aage J.
 
 

Re:MySql - newbie Q.: "Unable to Load LIBMYSQL.dll"

Hi there,
I am newbie with MySQL also - not using DBExpress but ZeosLib - but I
will try to help...
I am sure other have more experience, so if I am wrong, please jump in
and correct!
First, I think best NOT to use the mysql database - if you look at
content this is for setting database access rights, user rights etc.
Best to create your own database in a subdir of mysql/data (as is done
for the "test" database) and put your stuff in there - that way you
won't mess up the MySQL config.!
Second, "MySQL help" recomends not running mysql as a service until you
have got things going - run it as a console app instead - that way you
can see error messages in a console window (= DOS window - use Run: cmd).
So now to libmysql.dll - i think it should be in the mysql/bin directory.
I don't think MySQL knows about \windows and Windows\system etc... in my
installation version 4.0.20 there is libmySQL.dll (244K, dated
29/05/2004 08:05) in the mysql/bin directory, and I have not had that
message! so I suggest to look there.
P.S. to look at the tables in the mysql database I suggest using one of
the GUI tools - MySQL administrator etc I have not found so good, but
DBManager I have just installed, and that seems very friendly to windows
people!
hope that helps!
Chris
Aage Johansen writes:
Quote
Delphi/6
Win2000

I've installed mySQL (as a service), I can see mysqld-nt.exe in
TaskManager, and running
mysqlshow mysql -u root -p
returns a list of tables in the standard mysql database (after prompting
for the password).

Starting with File|New|Application, I placed a TSQLConnection
(dbExpress) component on the form and filled in some fields in the
Params property. This is how it looks:
object cnTEST: TSQLConnection
ConnectionName = 'MSConnection'
DriverName = 'MYSQL'
GetDriverFunc = 'getSQLDriverMYSQL'
LibraryName = 'dbexpmys.dll'
Params.Strings = (
'BlobSize=-1'
'Database=mysql'
'DriverName=MYSQL'
'ErrorResourceFile='
'HostName=localhost'
'LocaleCode=0000'
'Password=abcxyz'
'User_Name=root')
VendorLib = 'LIBMYSQL.dll'
end
This is meant to connect to the database (mysql) I tested with mysqlshow
above.

When I try to set the "Connected" property to true, I get an error:
Unable to Load LIBMYSQL.dll

LIBMYSQL.dll resides on the folder where it was installed, and I have also
tried to copy it to WINNT, WINNT/system32 and the folder of the new app.
Still the same error.

Any hints?

I've downloaded a trial version og mysqldac (not installed yet) - will
this make life easier? Any recommendations for a set of components?
I will just use this to transfer some data from another database -
nothing advanced at all.


TiA
Aage J.
 

Re:MySql - newbie Q.: "Unable to Load LIBMYSQL.dll"

ChrisH writes:
Quote
Hi there,
I am newbie with MySQL also - not using DBExpress but ZeosLib - but I
will try to help...
I am sure other have more experience, so if I am wrong, please jump in
and correct!
Do you know whether Zeosdbo/6.1.5/stable supports MySql/4.1 ?
Quote
First, I think best NOT to use the mysql database - if you look at
content this is for setting database access rights, user rights etc.
For now I am just trying to connect to "anything" ...
mysqlshow seems to work, so something must be right!
Quote
So now to libmysql.dll - i think it should be in the mysql/bin directory.
I don't think MySQL knows about \windows and Windows\system etc... in my
installation version 4.0.20 there is libmySQL.dll (244K, dated
29/05/2004 08:05) in the mysql/bin directory, and I have not had that
message! so I suggest to look there.
I should have mentioned that the version I downloaded is 4.1.
LIBMYSQL.dll is (also) in the "bin" directory where the installation
process put it (C:\Program Files\MySQL\MySQL Server 4.1\bin ).
The date is 2004-10-25, and the size is just above 1MB.
My guess was/is that dbExpress didn't look in the right place. And the
right place for a dll is often WINNT\system32 or the application's
startup folder.
Who is looking for the dll? Delphi/dbExpress or MySql?
If Delphi/dbExpress, then where would it expect to find a dll?
Quote

P.S. to look at the tables in the mysql database I suggest using one of
the GUI tools - MySQL administrator etc I have not found so good, but
DBManager I have just installed, and that seems very friendly to windows
people!
I've just now downloaded DBManager.
Thanks for helping out.
--
Aage J.
I'm mostly using Firebird (with IBO), and a very small amount of MS SQL
Server and Sybase (with ADO, and also SQL-direct). I might try
SQL-direct if I cannot get dbExpress to work.
 

Re:MySql - newbie Q.: "Unable to Load LIBMYSQL.dll"

Aage Johansen writes:
Quote
ChrisH writes:

>Hi there,
>I am newbie with MySQL also - not using DBExpress but ZeosLib - but I
>will try to help...
>I am sure other have more experience, so if I am wrong, please jump in
>and correct!


Do you know whether Zeosdbo/6.1.5/stable supports MySql/4.1 ?
Yes it does, according to the Zeos docs:
ZeosDBO supports direct connectivity to the following databases using
the vendor provided, native interface:
* MySQL 3.20 - 4.1
Quote

>First, I think best NOT to use the mysql database - if you look at
>content this is for setting database access rights, user rights etc.


For now I am just trying to connect to "anything" ...
mysqlshow seems to work, so something must be right!
Ah yes, I have been there too!
If your installation is "standard", assuming single machine, Windows XP etc.
and you downloaded the windows debug version,
then perhaps this will help:
start the mysql _server_daemon (program) from DOS window as follows:
c:\mysql\bin>mysqld --console
should see "mysqld: ready for conenections"
(to use other utilities like mysqlshow, or to stop it:
open another dos window and>mysqladmin -u root shutdown)
In a second DOS window then start the mysql monitor client program - so
you can talk to the MySQL server ! Log in as localhost and root user (
add password if you have set one)
mysql\bin>mysql -h localhost -u root
"Welcome to the MySQL monitor. Commands end with ; or \g"
"Your MySQL connection id is 2 to server version 4.0.20a-debug"
etc..
The prompt should change to
mysql>
so now you can enter things like
mysql>SHOW DATABASES
and get response
Database: mysql, test
(displayed in table form)
(to exit mysql type "exit;"
good luck!
Chris
Quote

>So now to libmysql.dll - i think it should be in the mysql/bin directory.
>I don't think MySQL knows about \windows and Windows\system etc... in
>my installation version 4.0.20 there is libmySQL.dll (244K, dated
>29/05/2004 08:05) in the mysql/bin directory, and I have not had that
>message! so I suggest to look there.


I should have mentioned that the version I downloaded is 4.1.
last time I looked 4.1 was not a "production" version - so I am using
4.0.20 - not wanting any bugs to further confuse me!
Quote

LIBMYSQL.dll is (also) in the "bin" directory where the installation
process put it (C:\Program Files\MySQL\MySQL Server 4.1\bin ).
The date is 2004-10-25, and the size is just above 1MB.

My guess was/is that dbExpress didn't look in the right place. And the
right place for a dll is often WINNT\system32 or the application's
startup folder.
Who is looking for the dll? Delphi/dbExpress or MySql?
If Delphi/dbExpress, then where would it expect to find a dll?

Sorry, I don't know about DBExpress!
>
>P.S. to look at the tables in the mysql database I suggest using one
>of the GUI tools - MySQL administrator etc I have not found so good,
>but DBManager I have just installed, and that seems very friendly to
>windows people!


I've just now downloaded DBManager.


Thanks for helping out.
 

Re:MySql - newbie Q.: "Unable to Load LIBMYSQL.dll"

Hi Chris
Well, I installed the Zeos component set for Delphi/6, and moved the
library libmysql40.dll to C:\WINNT\system32 (as per the Zeos install guide).
I've set the library path to include the Zeos "build" directory, and
loaded the "simple" example project. I haven't created any of the
databases, I just try to open the old mysql one (I can see the tables
here using the mysqlshow program, see below).
Clicking the connect button gives (after a brief pause):
"SQL Error: Client does not support authentication protocol requested by
server; consider upgrading MySQL client."
Removing the libmysql40.dll (from the system32 directory) gives me a
message about the missing dll (on connect) - quite correct.
Renaming the library provided by MySQL - libmysql.dll - to
libmysql40.dll causes other problems when trying to connect.
libmysql40.dll has a date of 29.04.2004, size is 245,760B.
Note that I installed the 'simplest' version of MySQL (no innodb).
I think MySQL is properly installed since I can run this from the
command prompt, and receive the list of tables:
c:\Program Files\MySQL\MySQL Server 4.1\bin>mysqlshow mysql -u root -p
Enter password: *********
Database: mysql
+---------------------------+
| Tables |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
c:\Program Files\MySQL\MySQL Server 4.1\bin>
--
Aage J.
 

Re:MySql - newbie Q.: "Unable to Load LIBMYSQL.dll"

Mysql 4.1x has changed the authentication protocol used by previous version
(3.x, 4.0). I think the library provided by zeos is a 4.0 which means it
would be missing the 4.1 protocol.
What can you do about it?
- commercially use dbexpress driver from MicroOlap
- wait for new direct-mysql which would fully support the new protocol (see
sourceforge for project home page) - currently i do not know when the
release date would be, but i hope early january.
- download / use the libmysql.dll that does arrive with your mysql
instalation
Kind regards,
Cristian Nicola
"Aage Johansen" <XXXX@XXXXX.COM>writes
---->library libmysql40.dll to C:\WINNT\system32 (as per
----->c:\Program Files\MySQL\MySQL Server 4.1\bin>mysqlshow mysql -u
root -p
 

Re:MySql - newbie Q.: "Unable to Load LIBMYSQL.dll"

Cristian Nicola writes:
Quote
Mysql 4.1x has changed the authentication protocol used by previous version
(3.x, 4.0). I think the library provided by zeos is a 4.0 which means it
would be missing the 4.1 protocol.
What can you do about it?
- commercially use dbexpress driver from MicroOlap
- wait for new direct-mysql which would fully support the new protocol (see
sourceforge for project home page) - currently i do not know when the
release date would be, but i hope early january.
- download / use the libmysql.dll that does arrive with your mysql
instalation
Kind regards,
Cristian Nicola

"Aage Johansen" <XXXX@XXXXX.COM>writes
news:418fe9f1$XXXX@XXXXX.COM...
---->library libmysql40.dll to C:\WINNT\system32 (as per
----->c:\Program Files\MySQL\MySQL Server 4.1\bin>mysqlshow mysql -u
root -p


Thanks. Your explanation seems likely.
I did try to use the libmysql.dll provided by the mysql installation
(renamed to libmysql40.dll) - didn't work. I might change the Zeos code
and recompile (to make Zeos look for libmysql.dll), but I don't think
this will fix anything.
Maybe the Zeosdbo 6.5.0-alpha could be used?
I used 6.1.5-stable, should I have applied the 6.1.5-patch1 ?
--
Aage J.
 

Re:MySql - newbie Q.: "Unable to Load LIBMYSQL.dll"

Followup:
I uninstalled Zeos 6.1.5-stable, and installed 6.5.0-alpha.
I can now open the tables in the mysql directory (provided by the mysql
install) using the "mysql-4.1" protocol with the Zeos-provided
libmysql41.dll.
Now, maybe I can do something worthwhile with it ...
--
Aage J.