I tried to access MySQL from Python 3.3 with the following methods:
import mysql.connector
config = {
\'user\': \'###\',
\'password\': \'******\',
\'h
This means MySQL has denied the connection for one of these reasons:
MySQL's users are actually a combination of a user and a pattern for where you can connect from. e.g. 'user'@'10.0.23.99' or 'test'@'%' or 'fred'@'196.168.123.%' or 'mary'@'%.example.com'
Using a MySQL client, check the "user" table in the "mysql" database to see what users MySQL knows about and what hosts the can connect from.
e.g.
mysql> SELECT user, host FROM mysql.user WHERE user = 'youruser';
Check the MySQL documentation for how to add users. See also how to GRANT access to different tables etc.
http://dev.mysql.com/doc/refman/5.5/en/adding-users.html
http://dev.mysql.com/doc/refman/5.5/en/grant.html
Given that your anonymised IP addresses look the same I suppose you might be running your Python code on the same machine as MySQL is running on. If so, you might find that you are using the server's external IP address whereas perhaps MySQL is configured to accept connections only from localhost/127.0.0.1. If so, try changing the IP address you're connecting to. Also, usually if you're running on the database server, you can connect via a Unix domain socket instead of via TCP/IP. To do this, just leave out the host and port parameters.