這是本文件的舊版!


mycli

yaourt -S mycli
mycli -u root -p
CREATE DATABASE newdatabase;
USE newdatabase
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'newpassword';
GRANT ALL PRIVILEGES ON newdatabase.* TO 'newuser'@'localhost';
mysqladmin -u root password 'new-password'
mysqladmin -u root -h localhost password 'new-password'
SET PASSWORD FOR 'user'@'localhost' = PASSWORD('password');
SELECT * FROM mysql.user;
SHOW DATABASES;
SELECT host, USER, password FROM mysql.user;
SHOW GRANTS FOR username@localhost;
REVOKE ALL privileges ON newdatabase.* FROM 'newuser'@'localhost';
FLUSH privileges;
SHOW TABLES