parent
94a3975fc7
commit
ce656255c4
|
@ -32,6 +32,7 @@ systemctl start mariadb
|
|||
```sh
|
||||
mysql_secure_installation
|
||||
|
||||
Enter current password for root (enter for none):[password]
|
||||
Switch to unix_socket authentication [Y/n] n
|
||||
Change the root password? [Y/n] Y
|
||||
Remove anonymous users? [Y/n] Y
|
||||
|
@ -53,7 +54,7 @@ drop database <database name>;
|
|||
# 选择操作的数据库
|
||||
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";
|
||||
# 强制写入
|
||||
|
|
Loading…
Reference in New Issue