這是本文件的舊版!


Install mycli mycli

yaourt -S mycli

Login to mysql shell

mycli -u root -p
CREATE DATABASE menagerie;
USE menagerie

shell> mysql -h host -u user -p menagerie

Change root crendential

mysqladmin -u root password 'new-password' mysqladmin -u root -h localhost password 'new-password'

mysql> SHOW DATABASES;

mysql> select host, user, password from mysql.user; mysql> SHOW GRANTS FOR username@localhost;