HelioHost Posted June 30, 2020 Posted June 30, 2020 Username: bmeyer, Server: Johnny, Main domain: earlyedresearch.org Dear Sir or Madam,Yesterday we were fortunate enough to obtain space on one of your servers.==C2=A0 I have since read the Wiki on setting up a MySQL database and it was= quite helpful.=C2=A0 Thank you.-The Wiki contained information about accessing the database with PHP.=C2=A0= My back end processing is Python and Flask.=C2=A0 Is there a way to connec=t to MySQL via those processes?-Thank you for any guidance you may be able to provide.Best, Bruce MeyerEarly Education Research Foundation.
Krydos Posted July 1, 2020 Posted July 1, 2020 Yes, try something like this: import mysql.connector mydb = mysql.connector.connect( host="localhost", user="bmeyer_user", password="yourpassword", database="bmeyer_db" ) mycursor = mydb.cursor() mycursor.execute("SELECT * FROM example") myresult = mycursor.fetchall() for x in myresult: print(x)
Recommended Posts