MySQL Learning--mysql startup failure case
System environment:
Operating system: Linux RH6
Database: Mysql 5.6
Startup failure when starting MySQL server
[[Email protected] mysql]# service MySQL start
Starting MySQL ... The server quit without updating PID file [Failed]b/mysql/ogg.pid].
To view the MySQL error log:
[Email protected] mysql]# more Ogg.err
140928 10:32:59 mysqld_safe mysqld from PID File/var/lib/mysql/ogg.pid ended
140928 10:35:54 Mysqld_safe starting mysqld daemon with databases From/var/lib/mysql
140928 10:35:54 innodb:the InnoDB memory heap is disabled
140928 10:35:54 innodb:mutexes and rw_locks use GCC atomic builtins
140928 10:35:54 innodb:compressed tables use zlib 1.2.3
140928 10:35:54 innodb:using Linux native AIO
140928 10:35:54 INNODB:CPU does not support CRC32 instructions
140928 10:35:54 innodb:initializing buffer pool, size = 128.0M
140928 10:35:54 innodb:completed initialization of buffer pool
140928 10:35:54 innodb:highest Supported file format is Barracuda.
140928 10:35:54 innodb:128 rollback segment (s) is active.
140928 10:35:54 innodb:waiting for the background threads to start
140928 10:35:55 innodb:1.2.4 started; Log sequence Number 1604733
/usr/local/mysql/bin/mysqld:file '/var/lib/mysql/mysql-bin.000012 ' not Found (errcode:2)
140928 10:35:55 [ERROR] Failed to open log (file '/var/lib/mysql/mysql-bin.000012 ', errno 2)
140928 10:35:55 [ERROR] Could not open log file
140928 10:35:55 [ERROR] Can ' t init TC Log
140928 10:35:55 [ERROR] Aborting
Should be in the previous operation, deleted the MySQL log!!!
To view the system directory:
[Email protected] mysql]# LS-LH
-RW-RW---- 1 mysql mysql 56 Sep 17 14:03 AUTO.CNF-RW-RW---- 1 mysql mysql 18M Sep 28 10:35 IBDATA1-RW-RW---- 1 mysql mysql 5.0m sep 28 10:35 ib_ LOGFILE0-RW-RW---- 1 mysql mysql 5.0m sep 17 13:51 ib_ LOGFILE1-RW-RW---- 1 mysql mysql 32 Sep 26 17:35 MASTER-LOG-BIN.INDEXDRWX------ 2 mysql root 4.0K Sep 17 13:51 MYSQL-RW-RW---- 1 mysql mysql 235 Sep 28 10:21 MYSQL-BIN.INDEX-RW-RW---- 1 mysql root 47K Sep 28 10:35 OGG.ERRDRWX------ 2 mysql mysql 4.0k sep 17 13:51 performance_ SCHEMADRWX------ 2 mysql root 4.0k sep 26 15:33 tes
Delete mysql-bin.index file, restart
[Email protected] mysql]# RM mysql-bin.index
Rm:remove regular file ' Mysql-bin.index '? Y
[[Email protected] mysql]# service MySQL start
Starting MySQL. [OK]
Start success, problem solving!!!
Appendix:
MySQL Error: mysql:the server quit without updating PID file. Here are the possible causes and workarounds
1. may be/usr/local/mysql/data/rekfan.pid file does not have permission to write
Workaround: Give permission, execute "chown-r mysql:mysql/var/data" "Chmod-r 755/usr/local/mysql/data" and restart mysqld!
2. The MySQL process may already exist in the process
WORKAROUND: Use the command "Ps-ef|grep mysqld" to see if there is a mysqld process, kill with "kill-9 process number" and then restart mysqld!
3. It may be the second time that MySQL is installed on the machine, with residual data affecting the start of the service.
Workaround: Go to MySQL data directory/data See, if there is mysql-bin.index, quickly delete it, it is the culprit.
4.mysql The/ETC/MY.CNF profile is used when the configuration file is not specified at startup, please open this file to see if there is a specified data directory (DATADIR) under the [Mysqld] section.
WORKAROUND: Please set this line under [mysqld]: DataDir =/usr/local/mysql/data
5.skip-federated Field Issues
Workaround: Check the/etc/my.cnf file for any skip-federated fields that have not been commented out, and if so, comment them out immediately.
6. Error log directory does not exist
Workaround: Use "Chown" "chmod" command to give MySQL owner and permissions
7.selinux, if it is a CentOS system, the default is to turn on SELinux
Workaround: Turn it off, open the/etc/selinux/config, change the selinux=enforcing to selinux=disabled, and then save the restart machine and try again.
This article is from the "Tianya blog," Please make sure to keep this source http://tiany.blog.51cto.com/513694/1558964
MySQL Learning--mysql startup failure case