Multiple errors when trying to import mysql.connector by using a python client in Jupyter notebook

29 views Asked by At

I am trying (inside Jupyter notebook) to connect mysql database using a Python client.

inside a jupyter notebook, I type the following code:

import mysql.connector as connector

connection=connector.connect(user="your_username", 
                             password="your_password")

I then receive a massive error message as shown in the attached pictures.

I have no idea what I am doing wrong here, and what is more strange is that 3 weeks ago, I wrote the exact same code, and it worked perfectly.

enter image description here enter image description here

I've tried uninstalling and reinstalling Jupyter, and the mysql-connector API. I've tried searching around the web to find someone else who had the same issue, but it seems like no one has had this issue in Jupyter notebook.

0

There are 0 answers