【问题标题】:can't create users or grant privileges on mysql db after reboot重启后无法在 mysql db 上创建用户或授予权限
【发布时间】:2021-07-16 21:00:46
【问题描述】:

我有一个在 ubuntu 服务器上运行的 mysql 数据库。原来是v5.7,后来升级到8.0.23版本。我最近重新启动了我的 ubuntu 服务器,现在我似乎无法创建用户或授予权限。我有一个示例,我尝试在下面创建两个测试用户,但我不断收到与 MyISAM 相关的错误。有谁知道问题可能是什么,您能建议如何解决吗?

mysql> create user 'testuser1'@'%%' identified by 'test1';
ERROR 1726 (HY000): Storage engine 'MyISAM' does not support system tables. [mysql.user]

我尝试了这篇文章中的建议:

How to fix ERROR 1726 (HY000): Storage engine 'MyISAM' does not support system tables. in Mysql 8.0 after CREATE USER

mysql> alter table mysql.db ENGINE=InnoDB;
Query OK, 7 rows affected (0.10 sec)
Records: 7  Duplicates: 0  Warnings: 0

mysql> alter table mysql.columns_priv ENGINE=InnoDB;
Query OK, 0 rows affected (0.09 sec)
Records: 0  Duplicates: 0  Warnings: 0

但它似乎没有解决它

mysql> create user 'test' identified by 'test';

ERROR 1726 (HY000): Storage engine 'MyISAM' does not support system tables. [mysql.user]

【问题讨论】:

  • 我希望你在开始这一切之前做好备份
  • 你指的链接有一个可能的解决方案here

标签: mysql ubuntu-server


【解决方案1】:

我遇到了同样的问题。

对我有用的是停止 MySQL 服务。

service mysqld stop

然后运行以下命令来强制升级架构。

mysqld --upgrade=FORCE

然后再次启动 MySQL 服务。

service mysqld start

之后一切都开始正常了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-25
    • 1970-01-01
    • 1970-01-01
    • 2021-03-22
    相关资源
    最近更新 更多