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

Rahul Satal

I am trying to deploy a django project on pythonanywhere but it is giving error-

(2003, "Can't connect to MySQL server on 'mysql.server' (111)")

I have seen many questions already asked for this problem but no answer solves my problem. May be there is a previlleges problem with accessing the 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 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)

While trying to login as a root i am getting the error as-

 mysql> mysql -u root -p ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql
 -u root -p' at line 1

Somebody please help me sort out this problem.

Selcuk

Using mysql.server as the hostname is deprecated. According to the official PythonAnywhere Django tutorial, you should now use:

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

PythonAnywhere wsgi deployment error

From Dev

Mailgun 404 error with Pythonanywhere

From Dev

Import Error in PythonAnywhere

From Dev

No module named request PythonAnywhere error

From Dev

ERROR 2003 on MYSQL 5.1 on Openshift

From Dev

mysql remote access ERROR 2003

From Dev

MySQL Error Number 2003 on windows 8

From Dev

Compatability error 2003 - 2016 macro in Excel

From Dev

Getting "error Tunnel connection failed: 403 Forbidden" with mechanize and pythonanywhere

From Dev

XML parsing error with Python Script with pythonanywhere (but not on local machine)

From Dev

Error in linking static files in django project deployed on pythonanywhere

From Dev

Error 400 with python-amazon-simple-product-api via pythonanywhere

From Dev

TemplateNotFound error Flask using render_template on Pythonanywhere

From Dev

Error in linking static files in django project deployed on pythonanywhere

From Dev

PythonAnywhere error trying to access MySQL database (Access denied)

From Dev

IBM XMS .NET - Receiving Error - Reason Code 2003

From Dev

can't connect to mysql on AWS RDS (error 2003)

From Dev

"Invalid Next Control Variable Reference" Error in VBA Excel 2003

From Dev

Twilio SMS Error 2003 in asp.net C# app

From Dev

Cant connect to MySQL server on localhost(0).Error No.2003

From Dev

MySQL:Error 2003 lost connection from a virtual machine on the same localnetwork

From Dev

<urlopen error Tunnel connection failed: 403 Forbidden> error in using geopy on pythonanywhere servers

From Dev

<urlopen error Tunnel connection failed: 403 Forbidden> error in using geopy on pythonanywhere servers

From Dev

I have deployed my django project in pythonanywhere, DATABASES is improperly configured error

From Dev

"Resource temporarily unavailable" error on reading CSV file in web2py app on PythonAnywhere

From Dev

ERROR 1130 (HY000) or ERROR 2003 (HY000) : connect mysql from windows to ubuntu on VMware

From Dev

Laragon MySQL ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061 "Unknown Error")

From Dev

MySql Error ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

From Dev

Laragon MySQL ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061 "Unknown Error")

Related Related

  1. 1

    PythonAnywhere wsgi deployment error

  2. 2

    Mailgun 404 error with Pythonanywhere

  3. 3

    Import Error in PythonAnywhere

  4. 4

    No module named request PythonAnywhere error

  5. 5

    ERROR 2003 on MYSQL 5.1 on Openshift

  6. 6

    mysql remote access ERROR 2003

  7. 7

    MySQL Error Number 2003 on windows 8

  8. 8

    Compatability error 2003 - 2016 macro in Excel

  9. 9

    Getting "error Tunnel connection failed: 403 Forbidden" with mechanize and pythonanywhere

  10. 10

    XML parsing error with Python Script with pythonanywhere (but not on local machine)

  11. 11

    Error in linking static files in django project deployed on pythonanywhere

  12. 12

    Error 400 with python-amazon-simple-product-api via pythonanywhere

  13. 13

    TemplateNotFound error Flask using render_template on Pythonanywhere

  14. 14

    Error in linking static files in django project deployed on pythonanywhere

  15. 15

    PythonAnywhere error trying to access MySQL database (Access denied)

  16. 16

    IBM XMS .NET - Receiving Error - Reason Code 2003

  17. 17

    can't connect to mysql on AWS RDS (error 2003)

  18. 18

    "Invalid Next Control Variable Reference" Error in VBA Excel 2003

  19. 19

    Twilio SMS Error 2003 in asp.net C# app

  20. 20

    Cant connect to MySQL server on localhost(0).Error No.2003

  21. 21

    MySQL:Error 2003 lost connection from a virtual machine on the same localnetwork

  22. 22

    <urlopen error Tunnel connection failed: 403 Forbidden> error in using geopy on pythonanywhere servers

  23. 23

    <urlopen error Tunnel connection failed: 403 Forbidden> error in using geopy on pythonanywhere servers

  24. 24

    I have deployed my django project in pythonanywhere, DATABASES is improperly configured error

  25. 25

    "Resource temporarily unavailable" error on reading CSV file in web2py app on PythonAnywhere

  26. 26

    ERROR 1130 (HY000) or ERROR 2003 (HY000) : connect mysql from windows to ubuntu on VMware

  27. 27

    Laragon MySQL ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061 "Unknown Error")

  28. 28

    MySql Error ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

  29. 29

    Laragon MySQL ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061 "Unknown Error")

HotTag

Archive