創(chuàng)建MySQL庫
目標(biāo):添加TestDB數(shù)據(jù)庫,加入user1用戶
賬號:user1
密碼:user1Password
終端運(yùn)行命令
1.登陸
>mysql -u root -p
>輸入root賬戶密碼
2.創(chuàng)建TestDB數(shù)據(jù)庫
>create database TestDB character set utf8mb4;
3.添加用戶權(quán)限
>grant all privileges on TestDB.* to user1@"%" identified by "user1Password";
4.刷新重載
>flush privileges;
出現(xiàn)問題:
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
>set global validate_password_policy=0;
>select @@validate_password_length;
>重新添加用戶權(quán)限就可以了.