Hi there, it is good to see you here.
I am trying to connect PythonAnywhere to a MySQL database. My connection to MySQL database from Bash Console in Dashboard, it works fine!
https://ibb.co/GxnhDMx
mysql -u kamus5 -h kamus5.mysql.pythonanywhere-services.com -p 'kamus5$comment2'
I am also trying to connect MySQL database using PythonAnywhere using this connection string :
SQLALCHEMY_DATABASE_URI = "mysql+mysqlconnector://{username}:{password}@{hostname}/{databasename}".format( username="kamus5", password="Mm688688", hostname="kamus5.mysql.pythonanywhere-services.com", databasename="kamus5@comment2",)
app.config["SQLALCHEMY_DATABASE_URI"] = SQLALCHEMY_DATABASE_URI
app.config["SQLALCHEMY_POOL_RECYCLE"] = 299 app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
Moreover, I switched the following ports: 299 to 3306 without success. It turns out Something went wrong :-( ... In my case, what is the connection string for PA to connect MySQL? Any help for this issue? I followed part 1 "A beginner's guide to building a simple database-backed Flask website on PythonAnywhere"
Thank you very much for your guidance.
Regards, Kamus