$ sudo apt-get install mysql-server
$ mysql -u user -p
mysql> CREATE DATABASE databasename;
mysql> SHOW DATABASES;
mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'some_password';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
-> ON cons_cmo.*
-> TO 'user'@'localhost';
mysql> \q
$ mysql -u user -p databasename < dump_file.sql
$ mysql -u user -p
mysql> USE databasename;
You can see at any time which database is currently selected using
mysql> SELECT DATABASE();
mysql> SHOW TABLES;
mysql> DESCRIBE table;
mysql> SELECT * FROM table;
(venv)$ pip install mysql-connector==2.1.4