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