Mysql学习MySQL下常见的启动失败与备份失败问题的解决教程
《Mysql学习MySQL下常见的启动失败与备份失败问题的解决教程》要点: MYSQL教程启动失败 MYSQL教程
[root@fisheye ~]# ps -ef | grep mysql
root 25555 21974 0 11:28 pts/0 00:00:00 grep mysql
MYSQL教程启动mysql服务器 MYSQL教程
[root@fisheye data]# service mysql start
MYSQL教程
MySQL server PID file could not be found![失败]
Starting MySQL.............. ERROR! The server quit without updating PID file (/mydata/data/fisheye..pid).[失败]
MYSQL教程查看差错日志: MYSQL教程
[root@fisheye data]# tail -100 fisheye.err
MYSQL教程
InnoDB: Last MySQL binlog file position 0 337403929,file name ./mysql-bin.000016
141013 1:13:28 InnoDB: Waiting for the background threads to start
141013 1:13:29 InnoDB: 5.5.33 started; log sequence number 1006647152
17:13:29 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt,improperly built,or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
di141013 01:13:29 mysqld_safe mysqld from pid file /mydata/data/fisheye.pid ended
MYSQL教程未发现明显性差错提示,所以手动创建一个pid文件试试 MYSQL教程
[root@fisheye data]# touch /mydata/data/fisheye.pi
MYSQL教程再进行重启服务: MYSQL教程
[root@fisheye data]# service mysql restart
MYSQL教程
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
MYSQL教程突然想到之前看过此类报错的文章,记得有可能是磁盘空间不敷导致的mysql无法启动. MYSQL教程
[root@fisheye data]# df -h
MYSQL教程(文件系统????????????? 容量? 已用 可用 已用% 挂载点) MYSQL教程
/dev/sda1 9.5G 9.5G 0 100% /
/dev/sda4 5.5G 1.3G 4.0G 24% /mnt/backup
/dev/mapper/IhuilianVG-IhuilianLV00
22G 4.2G 17G 20% /var/www/app
tmpfs 1.3G 0 1.3G 0% /dev/shm
MYSQL教程果然如此,下面罗列一些类似问题(无法启动)的解决思路: MYSQL教程2.可能是/mydata/data/fisheye.pid文件没有写的权限 MYSQL教程3.可能进程里已经存在mysql进程 MYSQL教程4.可能是第二次在机器上安装mysql,有残余数据影响了服务的启动. MYSQL教程5.skip-federated字段问题(报错信息:[ERROR] /mydata/data/mysql/libexec/mysqld: unknown option '--skip-federated') MYSQL教程6.selinux惹的祸,如果是centos系统,默认会开启selinux MYSQL教程备份失败 MYSQL教程
[root@test100 data]# mysqldump fx > fx.sql
MYSQL教程
mysqldump: Got error: 1146: Table 'user_suggest_report' doesn't exist when using LOCK TABLES
MYSQL教程考虑加上 --skip-lock-tables或者-R进行锁表尝尝,也是不行,信息如下 MYSQL教程
[root@test100 data]#mysqldump --skip-lock-tables fx > fx.sql
MYSQL教程
Error: Couldn't read status information for table vote_results () mysqldump: Couldn't execute 'show create table `user_suggest_report`': Table 'fx.user_suggest_report' doesn't exist (1146)
MYSQL教程登陆服务器查看是否存在此表 MYSQL教程
[root@test100 data]#mysql -h127.0.0.1 -D fx
mysql> show tables; #查看所有的表 --> 发现是表存在的
MYSQL教程
+--------------------------------+
| Tables_in_fx |
+--------------------------------+
| user_suggest_report |
+--------------------------------+
80 rows in set (0.00 sec)
MYSQL教程删除此表 MYSQL教程
mysql> drop table user_suggest_report; #既然是存在的,但是系统却认定不存在阐明存在问题,索性想删除试试
MYSQL教程
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_suggest_report' at line 1
MYSQL教程进入mysql存储目录下将其数据表移动或删除 MYSQL教程
[root@test100 data]# cat /etc/my.cnf | grep datadir
datadir=/var/lib/mysql
[root@test100 data]# cd /var/lib/mysql/fx/
[root@test100 fx]# mv user_suggest_report.frm /data
MYSQL教程重启mysql服务器 MYSQL教程
[root@test100 fx]# service mysqld restart
MYSQL教程重新备份操作 MYSQL教程
[root@test100 data]# mysqldump fx > fx.150109.sql #操作胜利
欢迎参与《Mysql学习MySQL下常见的启动失败与备份失败问题的解决教程》讨论,分享您的想法,编程之家PHP学院为您提供专业教程。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |