错误

ahy6op9u  于 2021-06-20  发布在  Mysql
关注(0)|答案(0)|浏览(247)

mysql需要在我升级到Ubuntu18.04后重新安装。升级之前我做了“sudo service mysqld stop”,然后清理步骤必须删除mysql服务器。当它没找到时,我找到了:

sudo apt-get remove mysql-server
sudo apt-get install mysql-server

...
Setting up mysql-server-5.7 (5.7.22-0ubuntu18.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
mysqld: [Warning] World-writable config file '/etc/mysql/my.cnf' is ignored.
Please enable --log-error option or set appropriate redirections for standard output and/or standard error in daemon mode.
Warning: Unable to start the server. Please restart MySQL and run mysql_upgrade to ensure the database is ready for use.
mysqld: [Warning] World-writable config file '/etc/mysql/my.cnf' is ignored.
Please enable --log-error option or set appropriate redirections for standard output and/or standard error in daemon mode.
Warning: Unable to start the server.
...

然后我运行了“systemctl status mysql.service”,它报告了以下内容:

Jul 19 11:21:49 steve-VAIO mysqld[6106]: 2018-07-19T18:21:49.828124Z 0 [ERROR] InnoDB: Operating system error number 2 in a file oper
Jul 19 11:21:49 steve-VAIO mysqld[6106]: 2018-07-19T18:21:49.828132Z 0 [ERROR] InnoDB: The error means the system cannot find the pat
Jul 19 11:21:49 steve-VAIO mysqld[6106]: 2018-07-19T18:21:49.828140Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `my
Jul 19 11:21:49 steve-VAIO mysqld[6106]: 2018-07-19T18:21:49.828199Z 0 [Warning] InnoDB: Cannot calculate statistics for table `mysql
Jul 19 11:21:49 steve-VAIO mysqld[6106]: 2018-07-19T18:21:49.828232Z 0 [ERROR] Can't open and lock privilege tables: Tablespace is mi
Jul 19 11:21:49 steve-VAIO mysqld[6106]: 2018-07-19T18:21:49.846964Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180719 11:21:4
Jul 19 11:21:49 steve-VAIO mysqld[6106]: 2018-07-19T18:21:49.934673Z 0 [Note] Event Scheduler: Loaded 0 events
Jul 19 11:21:49 steve-VAIO mysqld[6106]: 2018-07-19T18:21:49.934950Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Jul 19 11:21:49 steve-VAIO mysqld[6106]: Version: '5.7.22-0ubuntu18.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu
Jul 19 11:21:49 steve-VAIO systemd[1]: Started MySQL Community Server.

mysqld正在运行,我的数据库也可以使用,但我确信当它更新时,这会再次困扰我。phpmyadmin显示了mysql数据库,它看起来很健康。在数据库列表的顶部是一个名为“#mysql50#mysql.bkp”的数据库。
有什么清理的建议吗?
在建议运行mysql\u升级之后,我做了:

steve@steve-VAIO:~/workspace/JavascriptCourse$ mysql_upgrade -u root -p
mysql_upgrade: [Warning] World-writable config file '/etc/mysql/my.cnf' is ignored.
Enter password: 
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
mysql_upgrade: [ERROR] 1812: Tablespace is missing for table `mysql`.`plugin`.

因此,我将查找此表的表空间的修复程序。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题