重新安装后Kubuntu 18无法更新mysql root密码

时间:2020-09-25 04:33:35

标签: mysql ubuntu

重新安装Kubuntu 18后,我无法更新mysql root密码:

root@AtHome:/mnt/_work_sdb8/wwwroot/lar/hostels3# mysql 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 51
Server version: 5.7.31-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

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.

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('1234');
Query OK, 0 rows affected, 2 warnings (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

mysql> exit;
Bye
root@AtHome:/mnt/_work_sdb8/wwwroot/lar/hostels3# mysql --version
mysql  Ver 14.14 Distrib 5.7.31, for Linux (x86_64) using  EditLine wrapper

我在输出时注意了:

Query OK, 0 rows affected, 2 warnings (0.00 sec)
  1. 如何检查这2条警告?
  2. 设置root密码的方式错误吗?
  3. 我安装了工作台,但无法使用新输入的密码https://prnt.sc/ungwjx
  4. 登录

哪种方法有效?

谢谢!

0 个答案:

没有答案