I have been trying to acces to mysql by bash by:
mysql -h PLCMGR.mysql.pythonanywhere-services.com -u PLCMGR 'PLCMGR$DataBase' -p
And i keep geting error like this:
ERROR 2005 (HY000): Unknown MySQL server host 'PLCMGR.mysql.pythonanywhere-services.com' (2)
Also in my code when I type in:
SQLALCHEMY_DATABASE_URI = "mysql+mysqlconnector://{username}:{password}@{hostname}/{databasename}".format(
username="PLCMGR",
password="haslo123", # database passowrd hidden
hostname="PLCMGR.mysql.pythonanywhere-services.com",
databasename="PLCMRG$DataBase",
)
app.config["SQLALCHEMY_DATABASE_URI"] = SQLALCHEMY_DATABASE_URI
I get Error in my logs that says:
sqlalchemy.exc.InterfaceError: (mysql.connector.errors.InterfaceError) 2003: Can't connect to MySQL server on 'PLCMGR.mysql.pythonanywhere-services.com:3306' (-2 Name or service not known)
I am not sure if these two things are somehow connected. Is there anyone who has idea how to solve it? I have copied host name right from Databases site