补充内容

Signed-off-by: ithink.chan <chenyang@autoai.com>
This commit is contained in:
ithink.chan 2019-07-31 18:15:38 +08:00
parent 94a3975fc7
commit ce656255c4
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ systemctl start mariadb
```sh ```sh
mysql_secure_installation mysql_secure_installation
Enter current password for root (enter for none):[password]
Switch to unix_socket authentication [Y/n] n Switch to unix_socket authentication [Y/n] n
Change the root password? [Y/n] Y Change the root password? [Y/n] Y
Remove anonymous users? [Y/n] Y Remove anonymous users? [Y/n] Y
@ -53,7 +54,7 @@ drop database <database name>;
# 选择操作的数据库 # 选择操作的数据库
use mysql; use mysql;
# 更改密码 # 更改密码
update user set authentication_string=PASSWORD('passwd') where User='root'; update user set authentication_string=PASSWORD('passwd') where user='root';
# 如果没这一行可能也会报一个错误,因此需要运行这一行 # 如果没这一行可能也会报一个错误,因此需要运行这一行
update user set plugin="mysql_native_password"; update user set plugin="mysql_native_password";
# 强制写入 # 强制写入