Solved

Delphi and MySQL

Posted on 2004-03-29
11
488 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
0
Comment
Question by:Motaz
  • 6
  • 5
11 Comments
 
LVL 24

Accepted Solution

by:
Tomas Helgi Johannsson earned 125 total points
ID: 10714289
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
 
LVL 7

Author Comment

by:Motaz
ID: 10722017
Thanks but it is not free, I want to use borland dbExpress

Motaz
0
 
LVL 24

Expert Comment

by:Tomas Helgi Johannsson
ID: 10722250
No this is Open Source. Check out http://www.zeoslib.net/

Regards,
  Tomas Helgi
0
 
LVL 7

Author Comment

by:Motaz
ID: 10730263
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
 
LVL 24

Expert Comment

by:Tomas Helgi Johannsson
ID: 10730501
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 7

Author Comment

by:Motaz
ID: 10730812
I tried user@computername without success, but how can I gave the user rights for a database?

Motaz
0
 
LVL 24

Expert Comment

by:Tomas Helgi Johannsson
ID: 10730930
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
 
LVL 24

Expert Comment

by:Tomas Helgi Johannsson
ID: 10731100
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
 
LVL 7

Author Comment

by:Motaz
ID: 10750786
I still get invalid user name/password,
How can I create new user?

Motaz
0
 
LVL 24

Expert Comment

by:Tomas Helgi Johannsson
ID: 10751668
The above GRANT functions creates new user.


Regards,
  Tomas Helgi
0
 
LVL 7

Author Comment

by:Motaz
ID: 10830781
Finally it works!
I used root and blank password
Motaz
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now