Forums

ERROR 1045 (28000): Access denied for user 'conor1982'@'10.0.0.148' (using password: YES)

Hello,

I am new to pythonanywhere and am struggling to get a connection to the database I set up. I have gone through multiple different threads but can't seem to get mine to work. I have checked, re checked etc. to see if by host, username, password, database are all correct and they are. I have checked the "my.cnf" file and it is the same password being applied in my config!!!

I am stumped at this stage!!!

It's usually name of the database. In your case it would be "conor1982$default" or "conor1982$somethingelse" Make sure that it looks like that in your db configuration.

Thanks. Below is my config file. Everything appears to be correct!

# Database access configuration file.
# Please update variable values for each local machine/database names/password/host
mysql={
   "host":"conor1982.mysql.pythonanywhere-services.com",
   "username":"conor1982",
   "password":"datarep1",
   "database":"conor1982:$organisation"
}

You should probably not have the colon in the database name.

yes that sorted it, was able to access the databases and run server but!!!

after my login page I got a server error. In the error log files if got the following:

mysql.connector.errors.OperationalError: MySQL Connection not available.

Now I am getting:

mysql.connector.errors.ProgrammingError: 1226 (42000): User 'conor1982' has exceeded the 'max_user_connections' resource (current value: 3)

Check this help page about managing database connections.