mysql数据库出错:Table is marked as crashed and should be repaired

今天在打开网站的时候提示建立数据库连接时出错赶紧ssh到vps重启了下mysql之后发现正常了。查看了下mysql的错误日志,如下

root@lylinux:~# tail /var/log/mysql/error.log
150903 12:14:32 [Note] Server socket created on IP: '127.0.0.1'.
150903 12:14:32 [Note] Event Scheduler: Loaded 0 events
150903 12:14:32 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.44-0ubuntu0.12.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
150903 12:14:33 [ERROR] /usr/sbin/mysqld: Table './wordpress/wp_options' is marked as crashed and should be repaired
150903 12:14:33 [Warning] Checking table:   './wordpress/wp_options'
150903 12:14:34 [ERROR] /usr/sbin/mysqld: Table './wordpress/wp_baidusubmit_sitemap' is marked as crashed and should be repaired
150903 12:14:34 [Warning] Checking table:   './wordpress/wp_baidusubmit_sitemap'
150903 12:14:34 [ERROR] /usr/sbin/mysqld: Table './wordpress/wp_postmeta' is marked as crashed and should be repaired
150903 12:14:34 [Warning] Checking table:   './wordpress/wp_postmeta' 

输入下面命令可解决

mysqlcheck -uroot -ppassword  --repair --all-databases  

mysql数据库出错:Table is marked as crashed and should be repaired》上有2条评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注