Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 518
  • Last Modified:

Delphi and MySQL

I installed MySQL, and I'm trying to use dbExpress to connect to MySQL database using Delphi 7, I get unable to load mysqllib.dll, I copy this library to system directory without success.

Anybody face this problem and solve it befor?

Motaz
0
Motaz
Asked:
Motaz
  • 6
  • 5
1 Solution
 
Tomas Helgi JohannssonCommented:
I use Zeos Database Objects to connect to MySQL with good result.
You can download from Torry http://www.torry.net/pages.php?id=547.


Regards,
  Tomas Helgi
0
 
MotazAuthor Commented:
Thanks but it is not free, I want to use borland dbExpress

Motaz
0
 
Tomas Helgi JohannssonCommented:
No this is Open Source. Check out http://www.zeoslib.net/

Regards,
  Tomas Helgi
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
MotazAuthor Commented:
I installed the package, and I get an old version of libmysql.dll which makes dbExpress works, but I get invalid login name/password message, and I'm sure that I'm entering the correct user name and password.
I test it with local and remote database and I get the same error

Motaz
0
 
Tomas Helgi JohannssonCommented:
Have you checked for case-sensitivity on the username / password ?
And also if the user is written like user@localhost or user@mydomain.com (those users has to have access rights in MySQL as well)
MySQL recoginizes the user as user@....

Regards,
  Tomas Helgi
0
 
MotazAuthor Commented:
I tried user@computername without success, but how can I gave the user rights for a database?

Motaz
0
 
Tomas Helgi JohannssonCommented:
Check this manual http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#User_Account_Management
for managing user accounts and privilages.

Regards,
  Tomas Helgi
0
 
Tomas Helgi JohannssonCommented:
shell> mysql --user=root mysql
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON bankaccount.*
    ->     TO 'custom'@'localhost'
    ->     IDENTIFIED BY 'obscure';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON expenses.*
    ->     TO 'custom'@'whitehouse.gov'
    ->     IDENTIFIED BY 'obscure';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON customer.*
    ->     TO 'custom'@'server.domain'
    ->     IDENTIFIED BY 'obscure';
The three accounts can be used as follows:

The first account can access the bankaccount database, but only from the local host.
The second account can access the expenses database, but only from the host whitehouse.gov.
The third account can access the customer database, but only from the host server.domain.


Regards,
  Tomas Helgi
0
 
MotazAuthor Commented:
I still get invalid user name/password,
How can I create new user?

Motaz
0
 
Tomas Helgi JohannssonCommented:
The above GRANT functions creates new user.


Regards,
  Tomas Helgi
0
 
MotazAuthor Commented:
Finally it works!
I used root and blank password
Motaz
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now