Python shell gets restarted everytime I run this code, it is not getting connected with MySQL
import mysql.connector as msc
try:
a = msc.connect(host="localhost",user="root",password="",database="bro")
c = a.cursor()
c.execute("select * from bruh")
a.commit()
print("Executed successfully")
except Exception as e:
print(f"An error occurred: {e}")