I am using Jupyter Notebooks to learn Python. I would like to connect to a MySQL db hosted locally hosted through MAMP. How would I approach this?
import pymysql import pandas as a conn=pymysql.connect(host='localhost',port=int(3306),user='root',passwd='YOUR_PASSWORD',db='YOUR_DATABASENAME') df=a.read_sql_query("SELECT * FROM 'YOUR_TABLENAME' ",conn) print(df)