创建MySQL库

创建MySQL库



目标:添加TestDB数据库,加入user1用户

账号:user1

密码:user1Password

终端运行命令

1.登陆

>mysql -u root -p

>输入root账户密码

2.创建TestDB数据库

>create database TestDB character set utf8mb4;

3.添加用户权限

>grant all privileges on TestDB.* to user1@"%" identified by "user1Password";

4.刷新重载

>flush privileges;


出现问题:

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

>set global validate_password_policy=0;

>select @@validate_password_length;

>重新添加用户权限就可以了.

你可能感兴趣的:(创建MySQL库)