重新安装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)
哪种方法有效?
谢谢!