So I'm working on a Python script that will run from my VPS that I need to connect to a database on my webhosting, all with NFO.
I currently have a few various applications connecting to databases just fine in PHP. However when I try to connect to these databases in Python I keep getting refused. I've tried the MySQL Connector module and MySQLdb module. Both throw the same error.
_mysql_exceptions.OperationalError: (1044, "Access denied for user 'username'@'%' to database 'database_name'")
mysql.connector.errors.ProgrammingError: 1044 (42000): Access denied for user 'username'@'%' to database 'database_name'
These same credentials are working elsewhere and for other applications, I don't understand why it isn't for Python. Any suggestions or thoughts? Anyone else ever had a similar problem?
Python Refusing to Connect to MySQL
-
- A regular
- Posts: 55
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Mon Oct 28, 2013 11:02 pm
Re: Python Refusing to Connect to MySQL
Maybe it is just my local machine or something but it appears that it will connect okay when running the script on the VPS. I managed to get it to tell me the server version. I'll continue testing on this and see what happens.
Re: Python Refusing to Connect to MySQL
Have you made sure the "allow external connections" box is checked on the databse your python script is using?XDE4TH wrote:Maybe it is just my local machine or something but it appears that it will connect okay when running the script on the VPS. I managed to get it to tell me the server version. I'll continue testing on this and see what happens.
Not a NFO employee