MySQL

My S-Q-L

mysql -u root -p

Shell

Create user

 create user 'someuser' identified by 'password';

Create DB

create database somedb;
grant all privileges on somedb.* to 'someuser';
flush privileges;

Change user password

 alter user 'someuser' identified by 'password';

Export and Import

mysqldump -u someuser --password somedb > somedb.sql
mysql -u someuser --password somedb < somedb.sql

Troubleshooting

Authentication

Client does not support authentication protocol

alter user 'user'@'localhost' identified by 'new_pwd'; 
alter user 'user'@'localhost' identified with mysql_native_password BY 'new_pwd';

TIAGO SILVA

Connection