?
Solved

MYSQLCONNECTION fails on My SQL 5.2.38

Posted on 2012-04-01
9
Medium Priority
?
1,210 Views
Last Modified: 2012-04-03
After Installing My SQL 5.2.38 , I could connect to using the BDE OBDC components. I tried many times to connect to it via the Data explorer Server Name , Database name, User name and password . For the Server Name I used the name of the Server Instance on the Server Administration Local MySQL55. When I tested the connection I got a message back Borland.Data.TDBXError: DBX Error:  Driver could not be properly initialized.  Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path.

Is this a typical problem with the connection components and My SQL 5.2.38, or Im doing something completely wrong?

Thanks,
Mike
0
Comment
Question by:miker454
[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
  • 5
  • 4
9 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37792581
MySQL Workbench 5.2.38 and Delphi / Borland are not directly connected.  To connect to MySQL, you need a user with the appropriate connection privileges defined.  http://dev.mysql.com/doc/refman/5.5/en/adding-users.html   And here is the link to the ODBC connector: http://dev.mysql.com/downloads/connector/odbc/
0
 

Author Comment

by:miker454
ID: 37794613
I actually used the MySQL workbench that is a visual interface for windows and set up a connection with a connection name , Hostname, port, Username, and password. As well as Server instances that indentifies the directory where the data is to be stored.
I could not connect to the My SQL using the data explorer and MYSQL.

Thanks,
Mike
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37794667
Have you installed the MySQL ODBC connector?  That must be installed.  Here is some info on BDE ODBC with MySQL/ODBC: http://dev.mysql.com/doc/refman/5.5/en/connector-odbc-usagenotes-apptips.html
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:miker454
ID: 37798815
On the Windows 2008 server I can actually run the  MySQL ODBC 5.1 driver connector fill in the Data Source Name, User, TCI/IP Server, port 3306, password, and the database and it works fine. I test it and it is succesfull. On the client (windows 7 computer) I fill the same names and ports and it fails to even see the databases and it gives connection error when we test the connection. Connection Failed: [HY000][MySQL][ODBC 5.1 DRIVER]Can't connect to MySQL server on 'localhost' (10061) . Is there some details in the details tabs that needs to filled in for the client machine that I'm overlooking? I disabled the firewall on both the client and server. Not sure what else to do.


Thanks,
Mike
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37798896
Since your original user was set up for 'localhost', that won't work from another machine.  You probably need to create another MySQL user with the same username and password but with the 'anyhost' connection option.  See the link above about adding users.  Adding the user also includes adding the type of connection that is allowed and you have to make sure that user has permissions on the database also.
0
 

Author Comment

by:miker454
ID: 37802193
Thanks for the help Dave. I've set up My SQL server on both the local computer and the server computer. It took me while , but with the help of few on here I have set up an ODBC for both Databases (the local and the MSQLserver on the server) .  I can use the ODBC with the BDE, but I would like to use DBExpress  Data Explorer since they it is 64 bit. Using the Data Explorer to first try to connect to the MySQL in the local computer, I filled in the the Data Explorer:
Server Name: localhost
Database Name: mysql
User Name : root
Password :*******  
After clicking the test connection I get this message :
Borland.Data.TDBXError: DBX Error:  Driver could not be properly initialized.  Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path.

The Localhost database is active and root is the User name on the Database instance. I figure if I cannect to the local database first, I can then connect to the database on the server computer later (deal with other issues like the firewall). I'm assuming the db Express connects to the database instance directly and does not have to go through the BDE.
Thanks,
Mike
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 37802441
First, you should never use 'root' for anything other than administrative purposes on MySQL.  'root' has permissions on ALL databases to do ALL things... including deleting everything.

So did you install the 64-bit version of MySQL ODBC Connector on the 64-bit machine?  I don't know what "DBExpress  Data Explorer" is but I do know that you have to have a MySQL connector to work with MySQL databases.  You might want to read this page: http://stackoverflow.com/questions/5765424/how-to-access-databases-from-within-delphi-xe-professional-ide

Frankly, it would have been simpler to create an appropriate user on the other database.  Unless you're using 'root' there too in which case you should not create a 'root' user with external access.
0
 

Author Comment

by:miker454
ID: 37804298
Hi Dave appreciate all your advice. The problem was finally solved when I downloaded the libmysql.dll and put it delphi program directory. I followed the advice in this article http://wiltonsoftware.com/posts/view/getting-embarcadero-dbexpress-mysql-working-dbx-error-driver-not-initialized . It pretty much solved the problem. Appreciate all your great advice.

Thanks,
Mike
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37804319
Good find, glad you got it working.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

770 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