我在我们的 ubuntu 18.04 上成功安装了 MariaDB 10.4。
成功创建根用户,并创建另一个本地用户以仅控制一个数据库。
尽管我注意到 ssh 中的命令:
service mysql status
Mar 21 17:49:11 fresco systemd[1]: Started MariaDB 10.4.24 database server.
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10798]: Upgrading MySQL tables if necessary.
Mar 21 17:49:11 fresco mysqld[10757]: 2022-03-21 17:49:11 9 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10801]: Looking for 'mysql' as: /usr/bin/mysql
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10801]: Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10801]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10801]: FATAL ERROR: Upgrade failed
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10807]: Checking for insecure root accounts.
Mar 21 17:49:11 fresco mysqld[10757]: 2022-03-21 17:49:11 10 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
Mar 21 17:49:11 fresco mysqld[10757]: 2022-03-21 17:49:11 0 [Note] InnoDB: Buffer pool(s) load completed at 220321 17:49:11
壁画也是本地用户。
为什么我在 mysql 中以 root 身份收到这些错误?
这是没有意义的,因为当我以 root 身份登录 mysql 时一切似乎都很好,所有权限都被授予。
我很困惑,请帮帮我好吗?