System Specs
- MacBook Pro 2021, M1 Pro
- macOS Monterey
I have to use Jupyter lab to work with the Sakila database for my uni course. Every python/mysql package required for functionality is installed. I can work with the database through terminal without any issue. Whenever I try to create a connecting string to my database, the following error arrises.
Initial Error
%load_ext sql
%sql mysql://myUser:pass@localhost/sakila
Connection info needed in SQLAlchemy format, example:
postgresql://username:password@hostname/dbname
or an existing connection: dict_keys([])
name '_mysql' is not defined
Connection info needed in SQLAlchemy format, example:
postgresql://username:password@hostname/dbname
or an existing connection: dict_keys([])
Outcome of using pseudo data
%%sql
CREATE TABLE exercise_logs
(id INTEGER PRIMARY KEY AUTO_INCREMENT,
type TEXT,
minutes INTEGER,
calories INTEGER,
heart_rate INTEGER);
UsageError: Cell magic `%%sql` not found.