开发者

Starting MySQL.Manager of pid-file quit without updating fi error

开发者 https://www.devze.com 2023-01-24 10:16 出处:网络
I am getting following error while starting mysql ...can someone help: ]# service mysql start Starting MySQL.Manager of pid-file quit without updating fi[FAILED]

I am getting following error while starting mysql ...can someone help:

]# service mysql start Starting MySQL.Manager of pid-file quit without updating fi[FAILED] Following is my my.cnf file...

** my.cnf file *****

[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

que开发者_如何学Pythonry_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


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 :) ).


This can be happen due to two reasons:

  1. mysqld is trying to write logs to the disk, which is full.
  2. mysqld is trying to write logs to the file but it doesn't have appropriate permissions.


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.


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.


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.

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:

/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.

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.


I just prefix sudo command in the below statement and mysql started.

$ sudo /etc/rc.d/init.d/mysql start

Input password: Starting MySQL. I checked and found that MySQL is running by issuing below command:

$ mysqladmin -u root -pjoomla1 ping

mysqld is alive


For me the issue was with multiple my.cnf file put in server , removing one of it(wrong file) helped me resolve the issue


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.


here's what I noticed after playing with my.cnf config file to try optimum performance.

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:

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".

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.


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 ?


i think it will fix via hash query_cache


you didn't mention what system are you using here. For CentOS, Fedora, and Red Hat Enterprise Linux, use service mysqld instead of mysql

    sudo /etc/init.d/mysqld start


I believe the issue might be with the variable "performance_schema" found within your my.cnf file. This variable should be commented out. Give it a try.

0

精彩评论

暂无评论...
验证码 换一张
取 消