connect to database jupyter code example
Example: how to connect mysql database in jupyter notebook
# %%
%load_ext sql
# %%
%sql mysql+mysqldb://<user>:<password>@localhost/<dataBase>
# %%
%%sql
SELECT *
FROM <table>;
# %%
%load_ext sql
# %%
%sql mysql+mysqldb://<user>:<password>@localhost/<dataBase>
# %%
%%sql
SELECT *
FROM <table>;