Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Delphi and MySQL

Posted on 2004-03-29
11
Medium Priority
?
509 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 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 25

Expert Comment

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

Regards,
  Tomas Helgi
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 25

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
 
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 25

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 25

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 25

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

721 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