[Topic DIscussion] 不会安装mysql,
Tofloor
poster avatar
搁浅
deepin
2023-03-27 04:44
Author

能请教下,安装mysql时,不知为神马一直,卡在输入密码这,

granish@LYGPC:~$ ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '0525';
ALTER:未找到命令
granish@LYGPC:~$ sudo mysql_secure_installation
[sudo] granish 的密码: 

Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No: Y

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary                  file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0
Please set the password for root here.

New password: 

Re-enter new password: 

Estimated strength of the password: 25 
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
 ... Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.

New password: 

照着csdn做的时候,,,我进入mysql,又成这样了

granish@LYGPC:~$ sudo mysql
[sudo] granish 的密码: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.32-0ubuntu0.22.04.2 (Ubuntu)

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements5';
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '0525';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '0525';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> 
Reply Favorite View the author
All Replies
璀璨星空
deepin
2023-03-27 04:55
#1

用面板来装呗小皮或者是宝塔装特别方便hi

Reply View the author
川顺页
deepin
2023-03-27 05:07
#2

报错原因:mysql 8.0密码等级要求比较高,不能设置 0525这么简单的密码。

解决方法1:设置一个复杂一些的密码,包括字母,数字,字符,不要低于8位,建议10-16位。

解决方法2(不建议):改mysql的安全策略,将密码安全等级调低。

Reply View the author
爱开发
deepin
2023-03-27 06:57
#3

我现在都懒得跑这个了。直接跑 docker 多方便。

Reply View the author
zhiq263
deepin
2023-03-27 08:07
#4

看你的命令,登录mysql并没有指定用户

试试:

sudo mysql -uroot -p

登录后再修改看看

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

Reply View the author
阿古阿古
deepin
2023-03-27 09:20
#5
璀璨星空

用面板来装呗小皮或者是宝塔装特别方便hi

都有图形界面了,还要用宝塔,还不如用WSL

Reply View the author
fuuko
deepin
2023-03-27 16:21
#6

Your password does not satisfy the current policy requirementspride

Reply View the author