服务器环境:centos 6.4
启动代码:
# service mysqld start
Starting MySQL... ERROR! The server quit without updating PID file (/mnt/data/mysql/mysql.pid).
检查日志文件,也没有error:
131026 11:25:45 mysqld_safe Starting mysqld daemon with databases from /mnt/data/mysql
2013-10-26 11:25:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-10-26 11:25:46 13682 [Note] Plugin 'FEDERATED' is disabled.
2013-10-26 11:25:47 7feddd850720 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2013-10-26 11:25:47 13682 [Note] InnoDB: The InnoDB memory heap is disabled
2013-10-26 11:25:47 13682 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-10-26 11:25:47 13682 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-10-26 11:25:47 13682 [Note] InnoDB: CPU does not support crc32 instructions
2013-10-26 11:25:47 13682 [Note] InnoDB: Using Linux native AIO
2013-10-26 11:25:47 13682 [Note] InnoDB: Initializing buffer pool, size = 10.0M
2013-10-26 11:25:47 13682 [Note] InnoDB: Completed initialization of buffer pool
131026 11:25:47 mysqld_safe mysqld from pid file /mnt/data/mysql/mysql.pid ended
检查目录权限:
# ls -l /mnt/data/
总用量 656020
drwxr-xr-x 7 mysql mysql 4096 10月 26 11:24 mysql
伊谢尔伦2017-04-17 11:16:50
/var/log
, such as messages
, daemon.log
, etc.;PHP中文网2017-04-17 11:16:50
ls -lZ checks the SELinux permissions of mysql datadir
If it is a SELinux permission problem, you can use the following method to restore it. Assume that your datadir is /var/lib/mysql:
semanage fcontext -a -t mysqld_db_t "/var/lib/mysql(/.*)?"
restorecon -Rv /var/lib/mysql
黄舟2017-04-17 11:16:50
I have encountered this problem several times. I'll write down what I did, but it may not necessarily be useful to you.
I don’t know if it will be useful to you
PHPz2017-04-17 11:16:50
cat /var/log/messages
It means there is not enough memory.
top check which programs occupy the memory,
or /etc/my.cnf and adjust the buffer pool
or sync && echo 1 > /proc/sys/vm/drop_caches Release memory