MySQL Essentials

MySQL Logo

MySQL Essentials

MySQL Logo

Login

Console

mysql -u root -p
Enter password: **********
mysql>

Remote Login

Requires the mysql client (install mysql -y) & TCP 3306 to be open

mysql -u [user_name] -p -h [database.rds.amazonaws.com] [database_name]

Databases

show databases;
use exampledatabase;

Restore DB

mysql -u [user] -p [database_name] < [filename].sql

Tables

show tables;
select * from wp_options
show global variables
  • https://www.mysql.com/
  • https://hub.docker.com/_/mysql/