Pages

Wednesday, March 6, 2013

Mysql ODBC connection to Linux Mysql database


If you have a database user that needs and ODBC connection to a mysql database, you create a user name and password, then before they can connect you need to add that user's computer IP address to linux to enable or allow access. By default, MySQL does not allow remote clients to connect to the MySQL database and your user is likely connecting remotely.

Use this code:

use mysql
GRANT ALL ON *.* to USERNAME @'10.30.1.2' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;

Replace the USERNAME  and PASSWORD with your actual values.

Also, update firewall rules to make sure port# 3306 is open on the server that is running the mysql database.



remember, first you need to login to mysql

$ mysql -u root -p
Enter password: