我在 Ubuntu 14.04 上安装了 MySQL Server 5.7.20,可以使用以下方式登录服务器:
mysql -u root -p
密码为空...我该如何在终端设置MySQL根密码以便在安装MySQL服务器前使用?
我使用了静默安装方式安装它,然后尝试在终端运行此MySQL查询:
SET PASSWORD FOR 'root'@'localhost' = 'mypasswordhere';
但是我得到了这个:
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> SHOW warnings;
+-------+------+------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+------------------------------------------------------------------------------------------------------------+
| Note | 1699 | SET PASSWORD has no significance for user 'root'@'localhost' as authentication plugin does not support it. |
+-------+------+------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
那我做错了什么?我只想将用户root的空白密码更改为mypasswordhere密码...应该怎样做?