EBOLE JANE
EBOLE JANE

Reputation: 1

how to solve this syntax error in jupyter notebook

I am trying to connect jupyter to mysql database using this syntax:

%sql mysql+pymysql://root:mother@123@localhost:3306/united_nations 

but i am getting the below syntax error:

MetaData.__init__() got an unexpected keyword argument 'bind'
Connection info needed in SQLAlchemy format, example:
               postgresql://username:password@hostname/dbname
               or an existing connection: dict_keys([])

I was expecting to connect jupyter notebook to mysql database

Upvotes: 0

Views: 102

Answers (1)

Jyothi Prasanth
Jyothi Prasanth

Reputation: 1

I was having the same problem today. But figured out after 4 hours of experimenting.

Python should be 3.13 version and prettytable==0.7.2

other libraries are mysql-connector-python, ipython-sql, notebook

%load_ext sql
%sql mysql+mysqlconnector://root:root@localhost:3306/test

Upvotes: 0

Related Questions