我刚刚在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用户的访问权限。
为了尝试解决管理员用户问题,我已经创建了该用户并授予了所有特权,但是它仍然显示该错误。
任何帮助将不胜感激。
答案 0 :(得分:3)
看起来好像已经进行了先前的安装,运行mysql_upgrade工具应该可以修复系统表,并使其与您现在安装的版本的结构正确。