• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2543
  • Last Modified:

MySQL ODBC Connection Fails?

Hi All,

I have got windows machine with ODBC 3.51 Driver installed. I'm trying to connect MySQL 5.0.51 installed on Linux machine (remote location).

When I try to create DSN I see error like below

Connection Failed: [HY000][MySQL][ODBC 3.51 Driver] Unknown MySQL Server host '{prodserver}' (0)

Open in new window


Please can any one help me to fill some thoughts?

Is that anything with ODBC driver version problem? I'm connecting to MySQL 5.0.51 with ODBC 3.51 driver?
0
yarabati
Asked:
yarabati
  • 4
1 Solution
 
Pratima PharandeCommented:
You should read the MySQL documentation on the access privilege system:
http://dev.mysql.com/doc/refman/5.0/...ge-system.html

And also the reference documentation on the statements used to administer
accounts and grant privileges:
http://dev.mysql.com/doc/refman/5.0/...ement-sql.html

So basically you need to grant privilege to some account on your PC to
connect to one or more databases. For example:

GRANT ALL PRIVILEGES ON databasename.* TO 'username'@'bsanderson' IDENTIFIED
BY 'password';

refer for more details
http://bytes.com/topic/mysql/answers/453605-odbc-not-connection-database
0
 
yarabatiAuthor Commented:
Thanks for the response pratima.

Permissions are absolutely fine. I have had GRANT ALL ON *.* TO user@'%' IDENTIFIED BY 'sec1234'.

* the top 2 links you given seems to be broken, redirecting to Oracle search site.
0
 
AegilCommented:
you could test the connection to the mysql database manually.

e.g mysql -h prodserver.somedomain.com -u user -p pass123

or alternatively via a tool such as heidsql so you can make sure your pc can connect the mysql server. This way you rule out any issues with the connection /  network.

Also, are you able to connect the mysql server from other remote machines? If not you may need to configure the mysql server to be bound to public ips:

comment out bind_address = 127.0.0.1 in /etc/mysql/my.cnf
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
yarabatiAuthor Commented:
Aegil, Thanks for the response.

I'm able to connect mysql server from other machines. This is perfect.
0
 
yarabatiAuthor Commented:
Thank you very much akaodin.

As I suspect, the problem is with the versions. Looks like ODBC driver 3.51 is not compatible to connect MySQL 5.x versions. I have got ODBC driver 5.1 and it worked like charm.

Thanks all who tried help me out.

Cheers,
0
 
yarabatiAuthor Commented:
It was version problem as I suspect. But no one from here confirm me, so closing the post by accepting my response itself
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

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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