mysql启动失败,但没有error信息,请问如何解决?
大家讲道理
大家讲道理 2017-04-17 11:14:50
0
4
831

服务器环境: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
大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

Antworte allen(4)
伊谢尔伦
  1. 请给出启动失败与所展示的日志间的时间关系;
  2. 请检查 /var/log 下的通用日志,如 messagesdaemon.log 之类;
  3. 你的服务器启动脚本似乎是自己写的或者修改过,贴一下?
Ty80

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
黄舟

这个问题我也碰到过几次。我把我做的内容写一下,可能对你不一定有用。

  1. 查看 /etc/my.cnf 配置中 datadir,pid-file,stocket 路径是否正确
  2. pid,socket 的目录,都检查下mysql的权限
  3. 实在不行就pid,sock文件都放/tmp目录下

不知道对你有没有用

PHPzhong

cat /var/log/messages

说明内存不够,
top检查下那些程序占用内存,
或者 /etc/my.cnf调小buffer pool
或者 sync && echo 1 > /proc/sys/vm/drop_caches 释放内存

Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage