Applies To:

MySQL 5.1.44

 

Issue Summary:

When trying to create a DSN to MySQL we are unable to connect to MySQL database.  It refuses the connection.  

 

Resolution:

By default MySQL is configured to reject any connection from any machine other than 127.0.0.1 or localhost.  

  1.  Download Workbench
  2.  Navigate to Users and Privileges
  3.  Create a new user, or find your user and in the "Limit Connectivity to Hosts Matching" field enter a % (wildcard).  Or add your own remote IP address.  NOTE: you probably don't want to user root.  If you create a new user be sure to give them proper Administrative roles.  
  4.  In the mysql directory there is a file called my.cnf.  Open this file and change the "bind-address" from 127.0.0.1 to 0.0.0.0 or your ip address on the machine. Also comment out skip_networking  if it is present.  Save the changes. 
  5.  Restart the mysql service


Note: These changes are should be temporary. Please set everything back when you are done with whatever you are trying to accomplish.