django - (2003, "Can't connect to MySQL server on 'mysql.server' (111)") error in pythonanywhere -


i trying deploy django project on pythonanywhere giving error-

(2003, "can't connect mysql server on 'mysql.server' (111)")

i have seen many questions asked problem no answer solves problem. may there previlleges problem accessing database .

database settings are-

databases = {    'default': {     'engine': 'django.db.backends.mysql',     'name': 'mutechrobotics$mutech_db',     'user': 'mutechrobotics',     'password':'root',     'host': 'mysql.server', } } 

on running show grants command following databases displaying(actually need 1 database out of them unable drop ones)

mysql> show grants ;  +-------------------------------------------------------------------------------------------------------------------------------------------+ | grants mutechrobotics@%                                                                                                               | +-------------------------------------------------------------------------------------------------------------------------------------------+ | grant usage on *.* 'mutechrobotics'@'%' identified password '*81f5e21e35407d884a6cd4a731aebfb6af209e1b' max_user_connections 3 | | grant privileges on `mutechrobotics$default`.* 'mutechrobotics'@'%'                                                                | | grant privileges on `mutechrobotics$mutechnew_db`.* 'mutechrobotics'@'%'                                                           | | grant privileges on `mutechrobotics$mutech_db`.* 'mutechrobotics'@'%'                                                              | | grant privileges on `mutechrobotics$mu_db`.* 'mutechrobotics'@'%'                                                                  | +-------------------------------------------------------------------------------------------------------------------------------------------+ 5 rows in set (0.00 sec) 

my.cnf file is-

 [client] password = "root" 

when try give previleges user- "mutechrobotics" getting following error-

mysql> grant privileges on *.* 'mutechrobotics'@'%'  identified password 'root';   error 1045 (28000): access denied      user 'mutechrobotics'@'%' (using password: yes) 

while trying login root getting error as-

 mysql> mysql -u root -p ; error 1064 (42000): have error in sql syntax; check manual corresponds mysql server version right syntax use near 'mysql  -u root -p' @ line 1 

somebody please me sort out problem.

using mysql.server hostname deprecated. according official pythonanywhere django tutorial, should use:

'host': 'username.mysql.pythonanywhere-services.com', 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -