這是本文件的舊版!
Install mycli
yaourt -S mycli
Login to mysql shell
mycli -u root -p
Create database
CREATE DATABASE menagerie; USE menagerie
Change credential
mysqladmin -u root password 'new-password' mysqladmin -u root -h localhost password 'new-password' SET PASSWORD FOR 'user'@'localhost' = PASSWORD('password');
Show grants
SHOW DATABASES; SELECT host, USER, password FROM mysql.user; SHOW GRANTS FOR username@localhost;
List tables
SHOW TABLES