【问题标题】:Errors when checking status of just installed MariaDB 10.3 database检查刚刚安装的 MariaDB 10.3 数据库的状态时出错
【发布时间】:2019-07-18 09:51:22
【问题描述】:

我刚刚在 Centos 7 中安装了 MariaDB 10.3 数据库服务器。

一切顺利,但在执行“systemctl status mariadb”命令时。这是完整的输出:

root@vps [/etc/init.d]# systemctl status mariadb
● mariadb.service - MariaDB 10.3.13 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Sun 2019-02-24 22:34:04 -03; 40min ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 12247 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─12247 /usr/sbin/mysqld

Feb 24 22:46:39 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:39 32 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch..._upgrade
Feb 24 22:46:39 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:39 32 [ERROR] InnoDB: Column last_update in table `mysql`.`innodb_table_st...smatch).
Feb 24 22:46:39 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:39 32 [ERROR] InnoDB: Fetch of persistent statistics requested for table `...instead.
Feb 24 22:46:40 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:40 37 [ERROR] Column count of mysql.proc is wrong. Expected 21, found 20. ...is error
Feb 24 22:46:40 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:40 37 [ERROR] Incorrect definition of table mysql.event: expected column '...TE','POS
Feb 24 22:46:41 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:41 45 [ERROR] Incorrect definition of table mysql.event: expected column '...TE','POS
Feb 24 22:49:43 vps.desytec.com mysqld[12247]: 2019-02-24 22:49:43 47 [Warning] Access denied for user 'admin'@'localhost' (using password: YES)
Feb 24 22:49:43 vps.desytec.com mysqld[12247]: 2019-02-24 22:49:43 48 [Warning] Access denied for user 'admin'@'localhost' (using password: YES)
Feb 24 22:49:57 vps.desytec.com mysqld[12247]: 2019-02-24 22:49:57 55 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch..._upgrade
Feb 24 22:49:57 vps.desytec.com mysqld[12247]: 2019-02-24 22:49:57 55 [ERROR] InnoDB: Column last_update in table `mysql`.`innodb_table_st...smatch).
Hint: Some lines were ellipsized, use -l to show in full.

数据库已启动,但是,我想解决那里的错误。例如,表中缺少列或访问 admin@localhost 用户的问题。

为了尝试解决管理员用户问题,我创建了该用户并授予了所有权限,但它仍然显示该错误。

任何帮助将不胜感激。

【问题讨论】:

    标签: mariadb centos7


    【解决方案1】:

    看起来好像之前已经安装过,运行 mysql_upgrade 工具应该会修复系统表并将它们带到您现在安装的版本的正确结构。

    https://mariadb.com/kb/en/library/mysql_upgrade/

    【讨论】:

    • 我已经运行“# mysql_upgrade --force | grep 'mysql.event'”并且控制台显示“mysql.event OK”,但是,当再次运行“systemctl status mariadb”时它仍然显示错误开头是:“表 mysql.event 的定义不正确”以及所有其他错误。
    • 好吧,那么不像往常那么容易......“SHOW CREATE TABLE mysql.event;”是什么意思报告,什么“mysql_upgrade --version”?
    猜你喜欢
    • 2021-07-31
    • 2012-10-04
    • 2012-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-26
    • 2016-04-20
    相关资源
    最近更新 更多