首页 > 资讯列表 > 编程/数据库 >> 数据库操作教程

mysql报错:Error writing file '/var/run/mysqld/mysqld.pid' 解决方法

数据库操作教程 2014-12-07 01:33:04 转载来源: 网络整理/侵权必删

本文为大家讲解的是mysql报错:Error writing file '/var/run/mysqld/mysqld.pid'问题的解决方法,感兴趣的同学参考下。 错误描述: [ERROR] /usr/libexec/mysqld: Error writing file '/var/run/mysqld/mysqld.pid' (Errcode: 28) 130830 10:59:02  InnoDB: Initializing buffer pool, size = 1.0G 130830 10:59:02  InnoDB: Completed initialization of buffer pool 130830 10:59:02  InnoDB: Started; log sequence number 0 2727887496 130830 10:59:02 [ERROR] /usr/libexec/mysqld: Error writing file '/var/run/my

本文为大家讲解的是mysql报错Error writing file '/var/run/mysqld/mysqld.pid'问题的解决方法,感兴趣的同学参考下。

错误描述:

[ERROR] /usr/libexec/mysqld: Error writing file '/var/run/mysqld/mysqld.pid' (Errcode: 28)

130830 10:59:02  InnoDB: Initializing buffer pool, size = 1.0G

130830 10:59:02  InnoDB: Completed initialization of buffer pool
130830 10:59:02  InnoDB: Started; log sequence number 0 2727887496
130830 10:59:02 [ERROR] /usr/libexec/mysqld: Error writing file '/var/run/mysqld/mysqld.pid' (Errcode: 28)
130830 10:59:02 [ERROR] Can't start server: can't create PID file: No space left on device
130830 10:59:02 mysqld_safe Number of processes running now: 0
130830 10:59:02 mysqld_safe mysqld restarted
130830 10:59:02  InnoDB: Initializing buffer pool, size = 1.0G
130830 10:59:02  InnoDB: Completed initialization of buffer pool
130830 10:59:02  InnoDB: Started; log sequence number 0 2727887496
130830 10:59:02 [ERROR] /usr/libexec/mysqld: Error writing file '/var/run/mysqld/mysqld.pid' (Errcode: 28)
130830 10:59:02 [ERROR] Can't start server: can't create PID file: No space left on device
130830 10:59:03 mysqld_safe Number of processes running now: 0
130830 10:59:03 mysqld_safe mysqld restarted
130830 10:59:03  InnoDB: Initializing buffer pool, size = 1.0G

错误原因:

不能写入默认的pid文件,就 修改 /etc/init.d/mysqld,把pid指向别的路经

解决方法:

[root@app60 mysqld]# vi /etc/init.d/mysqld

.....

get_mysql_option mysqld datadir "/var/lib/mysql"
datadir="$result"
get_mysql_option mysqld socket "$datadir/mysql.sock"
socketfile="$result"
get_mysql_option mysqld_safe log-error "/var/log/mysqld.log"
errlogfile="$result"
get_mysql_option mysqld_safe pid-file "/opt/mysqldata/mysqld.pid"    # '/var/run/mysqld/mysqld.pid' 原始值,这里修改成别的路径/opt/mysqldata/mysqld.pid
mypidfile="$result"

.....

然后启动mysqld服务,OK,成功了。


标签: mysql 报错 Error writing file var run mysqld mysqld.pid


声明:本文内容来源自网络,文字、图片等素材版权属于原作者,平台转载素材出于传递更多信息,文章内容仅供参考与学习,切勿作为商业目的使用。如果侵害了您的合法权益,请您及时与我们联系,我们会在第一时间进行处理!我们尊重版权,也致力于保护版权,站搜网感谢您的分享!

站长搜索

http://www.adminso.com

Copyright @ 2007~2024 All Rights Reserved.

Powered By 站长搜索

打开手机扫描上面的二维码打开手机版


使用手机软件扫描微信二维码

关注我们可获取更多热点资讯

站长搜索目录系统技术支持