db/mysql/ PythonMysql


See this page on W3schools. Summary: to install

python -m pip install mysql-connector-python

and then to use

import mysql.connector

mydb = mysql.connector.connect(
  host="localhost",
  user="yourusername",
  password="yourpassword"
)

print(mydb)