I am trying to deploy a django project on pythonanywhere but it is giving error-
(2003, "Can't coect to MySQL server on 'mysql.server' (111)")
I have seen many such questions already asked for this problem but no answer solves my problem. May be there is a previlleges problem with database .
Database settings are-
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mutechrobotics$mutech_db', 'USER': 'mutechrobotics', 'PASSWORD':'root', 'HOST': 'mysql.server', } }
On ruing show grants command following databases are displaying(Actually i only need one database out of them but i am unable to drop the extra ones)
mysql> show grants ;
+-------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for mutechrobotics@% |
+-------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'mutechrobotics'@'%' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' WITH MAX_USER_CONNECTIONS 3 |
| GRANT ALL PRIVILEGES ON `mutechrobotics$default`.* TO 'mutechrobotics'@'%' |
| GRANT ALL PRIVILEGES ON `mutechrobotics$mutechnew_db`.* TO 'mutechrobotics'@'%' |
| GRANT ALL PRIVILEGES ON `mutechrobotics$mutech_db`.* TO 'mutechrobotics'@'%' |
| GRANT ALL PRIVILEGES ON `mutechrobotics$mu_db`.* TO 'mutechrobotics'@'%' |
+-------------------------------------------------------------------------------------------------------------------------------------------+
5 rows in set (0.00 sec)
my.cnf file is-
[client] password = "root"
When i try to give all previleges to user- "mutechrobotics" then i am getting the following error-
mysql> GRANT ALL PRIVILEGES ON *.* TO 'mutechrobotics'@'%'
IDENTIFIED BY PASSWORD 'root';
ERROR 1045 (28000): Access denied for
user 'mutechrobotics'@'%' (using password: YES)
Somebody please help me sort out this problem.
