VPS侦探论坛

 找回密码
 注册
查看: 5109|回复: 5

【军哥】修改mysql的my.cnf文件后 重启mysql报错

[复制链接]
发表于 2015-4-23 20:03:00 | 显示全部楼层 |阅读模式

修改mysql的my.cnf文件后 重启mysql报错,请问怎么解决,网上的方法都试过了,不行,系统是linux centos

具体报错内容如下:

ERROR! MySQL server PID file could not be found!
Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/AY14022110414457959eZ.pid).


下面是mysql的错误日志
150423 18:19:31 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
150423 18:19:31 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
150423 18:19:31 InnoDB: The InnoDB memory heap is disabled
150423 18:19:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150423 18:19:31 InnoDB: Compressed tables use zlib 1.2.3
150423 18:19:31 InnoDB: Initializing buffer pool, size = 16.0M
150423 18:19:31 InnoDB: Completed initialization of buffer pool
150423 18:19:31 InnoDB: highest supported file format is Barracuda.
150423 18:19:31  InnoDB: Waiting for the background threads to start
150423 18:19:32 InnoDB: 1.1.8 started; log sequence number 391498648
150423 18:19:32 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150423 18:19:32 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
150423 18:19:32 [Note] Server socket created on IP: '0.0.0.0'.
150423 18:19:32 [Note] Event Scheduler: Loaded 0 events
150423 18:19:32 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.28-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-4-23 20:19:59 | 显示全部楼层


有个warning ,按提示 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead. 修改试试
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-4-24 10:05:06 | 显示全部楼层

回复 2# 的帖子


意思是将原来的慢日志文件slow-query-log-file替换成slow-query-log?
改个文件名吗?
还是怎样?不太懂
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-4-25 12:22:03 | 显示全部楼层



参数替换,不是文件名
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2015-4-25 19:24:45 | 显示全部楼层

原来的my.cnf 备份了么? 先替换成不出错的my.cnf 文件。似乎是某个文件目录指向是错误的。

军哥运维代购:http://shop63846532.taobao.com/

发表于 2015-4-25 19:26:53 | 显示全部楼层

datadir = /usr/local/mysql/var  

似乎是这个,你看看。
你是不是用my-huge.cnf 替换my.cnf出的错。我上次也是直接替换出错了。后来回复成原来的my.cnf就没问题。

[ 本帖最后由 hitxiong 于 2015-4-25 19:28 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-16 12:02 , Processed in 0.027312 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表