# optional: 
import sys
sys.path.append('/usr/local/lib/python3.9/site-packages')

import mysql.connector

mydb = mysql.connector.connect (
        host="localhost",
        user="root",
        password="os1wald123",
        database = "mytools",
        auth_plugin='mysql_native_password'
       )
        
mycursor = mydb.cursor()

# select all rows from the employees table:
mycursor.execute('SELECT * FROM employees')

import pandas as pd

# populate a Pandas data frame with the data:
table_rows = mycursor.fetchall()
df = pd.DataFrame(table_rows)

print("=> Contents of data frame:")
print(df)

mydb.close()

