Hello Everyone, I read all files about import database and using MySQL. I did the following thing: 1. create database under Database dashboard 2. start the console on the database I created and then source my .sql files 3. set my setting files according to https://help.pythonanywhere.com/pages/UsingMySQL/
However I get the error message: "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock"
my setting file looks like this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'myusername$mydatabase', # Or path to database file if using sqlite3.
'USER': 'myusername',
'PASSWORD': 'mydatabasepassword',
'HOST': 'mysql.sever', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '', # Set to empty string for default.
}
}
I searched all similar questions and tried all solutions provided under those questions, but it doesn't work. Could you please give me any suggestions?
THANK YOU!