启动 pid-file 的 MySQL.Manager 退出而不更新 fi 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4137430/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Starting MySQL.Manager of pid-file quit without updating fi error
提问by user476554
I am getting following error while starting mysql ...can someone help:
我在启动 mysql 时遇到以下错误……有人可以帮忙吗:
]# service mysql start Starting MySQL.Manager of pid-file quit without updating fi[FAILED] Following is my my.cnf file...
]# service mysql start 启动 MySQL.Manager of pid-file quit without update fi[FAILED] 以下是我的 my.cnf 文件...
**my.cnf file *****
**my.cnf 文件 ** ***
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
table_cache = 2048
innodb_buffer_pool_size = 2G
innodb_file_per_table
innodb_log_buffer_size = 8M
innodb_log_file_size = 128M
innodb_additional_mem_pool_size = 4M
innodb_table_locks = 0
default-storage-engine=InnoDB
join_buffer_size = 2M
query_cache_size = 512M
query_cache_limit = 2M
sort_buffer_size = 8M
read_buffer_size = 8M
read_rnd_buffer_size = 4M
key_buffer = 512M
key_buffer_size = 256M
max_allowed_packet = 16M
max_connections = 250
long_query_time = 5
log_slow_queries = ekb-qa-app-02-slow.log
innodb_autoinc_lock_mode=2
的table_cache = 2048
innodb_buffer_pool_size = 2G
innodb_file_per_table
innodb_log_buffer_size = 8M
innodb_log_file_size = 128M
innodb_additional_mem_pool_size = 4M
innodb_table_locks = 0
默认存储引擎= InnoDB的
join_buffer_size = 2M
query_cache_size变量= 512M
query_cache_limit = 2M
sort_buffer_size的值= 8M
read_buffer_size = 8M
read_rnd_buffer_size = 4M
的key_buffer = 512M
的key_buffer_size = 256M
max_allowed_packet = 16M
max_connections = 250
long_query_time = 5
log_slow_queries = ekb-qa-app-02-slow.log
innodb_autoinc_lock_mode=2
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
回答by William
I received the exact same error...which ended up being misleading to me. The problem (at least for me) ended up being that I had filled the disk to capacity. Try df -h
and see if you are at capacity. Hope that helps, and that this error was caused by this as well for you ( since it is simple to fix :) ).
我收到了完全相同的错误......最终误导了我。问题(至少对我而言)最终是我已将磁盘填满。试试看df -h
你是否有能力。希望对您有所帮助,并且此错误也是由您引起的(因为它很容易修复:))。
回答by vaibhav tyagi
This can be happen due to two reasons:
发生这种情况的原因有两个:
- mysqld is trying to write logs to the disk, which is full.
- mysqld is trying to write logs to the file but it doesn't have appropriate permissions.
- mysqld 正在尝试将日志写入已满的磁盘。
- mysqld 正在尝试将日志写入文件,但它没有适当的权限。
回答by Uday Shanmugam
For me, the issue was insufficient privileges to the mysql data files. The data files were copied over from another file system as root. Once I changed the group and ownership of the files to mysql:mysql the error went away.
对我来说,问题是对 mysql 数据文件的权限不足。数据文件是以 root 身份从另一个文件系统复制过来的。一旦我将文件的组和所有权更改为 mysql:mysql 错误就消失了。
回答by gdelfino
Try running the mysqld_safe
directly and see if the error message is more specific about your problem. This way I was able to realize the my log file had a permissions problem.
尝试mysqld_safe
直接运行,看看错误消息是否更具体地说明了您的问题。通过这种方式,我能够意识到我的日志文件存在权限问题。
回答by IcarusNM
The /etc/init.d/mysql[d]startup script can also outsmart itself by printing overlapping error messages, but you only end up seeing one. You may also see "[FAILED]" or "[OK]" overlapping in the middle of the script output, and some of this may even depend on the exact terminal software you use.
该/etc/init.d/mysql[d]启动脚本也可以通过打印重叠的错误信息智取本身,而是你最终只会看到一个。您可能还会在脚本输出的中间看到“ [FAILED]”或“ [OK]”重叠,其中一些甚至可能取决于您使用的确切终端软件。
Meanwhile, in my case, the true error was buried underneath this:
同时,就我而言,真正的错误隐藏在下面:
Manager of pid-file quit wi[FAILED]dating file
I finally looked closely enough at my mysqld error log, and found the real issue:
我终于仔细查看了我的 mysqld 错误日志,发现了真正的问题:
/usr/sbin/mysqld: File 'MASTER/master15-bin.index' not found (Errcode: 2)
Like other similar cases here, the problem came from copying the whole /var/lib/mysql directory over from a different host. Here I was setting up a fresh replication server, and so the MASTER and SLAVE variables are different in /etc/my.cnf of course. My master binlogs are in a MASTER subdirectory.
像这里的其他类似情况一样,问题来自从不同的主机复制整个 /var/lib/mysql 目录。在这里我设置了一个新的复制服务器,所以当然 /etc/my.cnf 中的 MASTER 和 SLAVE 变量是不同的。我的主二进制日志位于 MASTER 子目录中。
Once I cleaned that up, everything was fine.
一旦我清理了它,一切都很好。
So this "Manager of pid-file quit" error was another red herring. I'm just adding this story here to show yet again that (1) the answer probably lies in your error log, and (2) may have nothing to do with this error you see from mysqld_safe.
所以这个“ pid-file 管理器退出”错误是另一个红鲱鱼。我只是在这里添加这个故事来再次表明 (1) 答案可能在您的错误日志中,并且 (2) 可能与您从 mysqld_safe 看到的这个错误无关。
回答by ursitesion
I just prefix sudocommand in the below statement and mysql started.
我只是在下面的语句中加上sudo命令的前缀,然后 mysql 就启动了。
$ sudo /etc/rc.d/init.d/mysql start
Input password: Starting MySQL.I checked and found that MySQL is running by issuing below command:
输入密码: 启动MySQL。我通过发出以下命令检查并发现 MySQL 正在运行:
$ mysqladmin -u root -pjoomla1 ping
mysqld is alive
mysqld 还活着
回答by ursitesion
here's what I noticed after playing with my.cnf config file to try optimum performance.
这是我在玩 my.cnf 配置文件以尝试最佳性能后注意到的。
If I set innodb_log_file_size to a wrong value and I try restarting the mysql server, it shuts down ok, but when it tries to start, I get something similar to the following:
如果我将 innodb_log_file_size 设置为错误的值并尝试重新启动 mysql 服务器,它会正常关闭,但是当它尝试启动时,我会得到类似于以下内容的信息:
Starting MySQL.The server quit without updating PID file ([FAILED]mysql/<insert pid file here>).
Then when I checked the error log to find out whats going on, I saw all this:
然后当我检查错误日志以了解发生了什么时,我看到了这一切:
140709 22:47:30 mysqld_safe mysqld from pid file /var/lib/mysql/<pid filename>.pid ended
140709 22:47:31 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140709 22:47:31 [Warning] Using unique option prefix thread_cache instead of thread_cache_size is deprecated and will be removed...
140709 22:47:31 [Note] Plugin 'FEDERATED' is disabled.
140709 22:47:31 InnoDB: The InnoDB memory heap is disabled
140709 22:47:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140709 22:47:31 InnoDB: Compressed tables use zlib 1.2.3
140709 22:47:31 InnoDB: Using Linux native AIO
140709 22:47:31 InnoDB: Initializing buffer pool, size = 512.0M
140709 22:47:31 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 67108864 bytes!
140709 22:47:31 [ERROR] Plugin 'InnoDB' init function returned error.
140709 22:47:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140709 22:47:31 [ERROR] Unknown/unsupported storage engine: InnoDB
140709 22:47:31 [ERROR] Aborting
140709 22:47:31 [Note] /usr/sbin/mysqld: Shutdown complete
140709 22:47:31 mysqld_safe mysqld from pid file /var/lib/mysql/<pid filename>.pid ended
Except that I replaced the pid filename with "pid filename".
除了我用“pid文件名”替换了pid文件名。
Websites think you can set innodb_log_file_size to a value but something is trying to tell me that it is a value that the mysql server calculates and its something you can't set.
网站认为您可以将 innodb_log_file_size 设置为一个值,但有些东西试图告诉我这是一个 mysql 服务器计算的值,而您无法设置它。
回答by Wilson Hauck
This suggestion will HELP also. REMOVE the following list so DEFAULTS can support your effort from [mysqld] section of my.cnf/.ini sort_buffer_size read_buffer_size read_rnd_buffer_size join_buffer_size to improve(reduce) response time. Why would you intentionally read 16M of read_rnd_buffer_size data when you could get the data you need with the DEFAULT of 256K ?
这个建议也将有所帮助。删除以下列表,以便 DEFAULTS 可以从 my.cnf/.ini 的 [mysqld] 部分支持您的努力 sort_buffer_size read_buffer_size read_rnd_buffer_size join_buffer_size 以改善(减少)响应时间。当您可以使用 256K 的 DEFAULT 获得所需的数据时,为什么要故意读取 16M 的 read_rnd_buffer_size 数据?
回答by linuxadmin003
If you have mysql on it's own partition (such as /var/lib/mysql), make sure that it hasn't gone read-only. to do this, attempt to create (touch) a file in that partition. if it has gone read-only, it will let you know and you will need to run a manual fsck on that partition. first make sure there are no running processes ( lsof /var/lib/mysql | awk '{print $1}'|sort|uniq -c|awk '{print $2}') then umount the partition before fscking it.
如果您在自己的分区(例如 /var/lib/mysql)上有 mysql,请确保它没有变为只读。为此,请尝试在该分区中创建(触摸)一个文件。如果它变为只读,它会通知您并且您需要在该分区上运行手动 fsck。首先确保没有正在运行的进程( lsof /var/lib/mysql | awk '{print $1}'|sort|uniq -c|awk '{print $2}')然后在 fscking 之前卸载分区。
回答by Pavan G jakati
For me the issue was with multiple my.cnf file put in server , removing one of it(wrong file) helped me resolve the issue
对我来说,问题是在服务器中放置了多个 my.cnf 文件,删除其中一个(错误的文件)帮助我解决了问题