We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Delphi and MySQL

Motaz
Motaz asked
on
Medium Priority
541 Views
Last Modified: 2010-04-05
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
Comment
Watch Question

Database Administrator / Software Engineer
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Thanks but it is not free, I want to use borland dbExpress

Motaz
Tomas Helgi JohannssonDatabase Administrator / Software Engineer
CERTIFIED EXPERT

Commented:
No this is Open Source. Check out http://www.zeoslib.net/

Regards,
  Tomas Helgi

Author

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
Tomas Helgi JohannssonDatabase Administrator / Software Engineer
CERTIFIED EXPERT

Commented:
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

Author

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

Motaz
Tomas Helgi JohannssonDatabase Administrator / Software Engineer
CERTIFIED EXPERT

Commented:
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
Tomas Helgi JohannssonDatabase Administrator / Software Engineer
CERTIFIED EXPERT

Commented:
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

Author

Commented:
I still get invalid user name/password,
How can I create new user?

Motaz
Tomas Helgi JohannssonDatabase Administrator / Software Engineer
CERTIFIED EXPERT

Commented:
The above GRANT functions creates new user.


Regards,
  Tomas Helgi

Author

Commented:
Finally it works!
I used root and blank password
Motaz
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.