登錄MySQL
mysql -u <username> -p <password>
顯示數(shù)據(jù)庫
show databases;
創(chuàng)建數(shù)據(jù)庫
create database <database_name>;
分配用戶權(quán)限
grant all on <database_name.*> to <'username'> identified by <'password'>;
mysql -u <username> -p <password>
show databases;
create database <database_name>;
grant all on <database_name.*> to <'username'> identified by <'password'>;