服务器环境: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
下的通用日志,如 messages
、daemon.log
之类;PHP中文网2017-04-17 11:16:50
ls -lZ 检查mysql datadir 的SELinux权限
如果是SELinux权限的问题可以用如下方法恢复 假设你的datadir是/var/lib/mysql:
semanage fcontext -a -t mysqld_db_t "/var/lib/mysql(/.*)?"
restorecon -Rv /var/lib/mysql
黄舟2017-04-17 11:16:50
这个问题我也碰到过几次。我把我做的内容写一下,可能对你不一定有用。
不知道对你有没有用
PHPz2017-04-17 11:16:50
cat /var/log/messages
说明内存不够,
top检查下那些程序占用内存,
或者 /etc/my.cnf调小buffer pool
或者 sync && echo 1 > /proc/sys/vm/drop_caches 释放内存