// 新增使用者
create user 'test'@'%' identified by '123456';
#test:使用者名,%:所有ip位址,123456:密碼
#授權給使用者test,資料庫test_db相關的所有權限,并且該使用者test在所有網絡IP上都有權限,%是指沒有網絡限制
grant all privileges on `test_db`.* to 'test'@'%' identified by '123456';
# 設定具體權限
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON TUTORIALS.* TO 'zara'@'localhost' IDENTIFIED BY 'zara123';
// 重新整理權限:
flush privileges;