MySQL mysql错误!服务器退出而不更新PID文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22077231/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 20:07:34  来源:igfitidea点击:

mysql ERROR! The server quit without updating PID file?

mysql

提问by Khodour.F

My Vps mysql wont boot , when i attempt to command service mysql start i got this error

我的 Vps mysql 无法启动,当我尝试命令 service mysql start 时出现此错误

root@## [/var/lib/mysql]# service mysql start
Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/***.***.com.pid).

this is my.cnf

这是 my.cnf

[mysqld]
local-infile=0
set-variable = 100
max_connections=100
safe-show-database

#userstat_running=on
query_cache_limit=4M
query_cache_size=64M
query_cache_type=1
max_user_connections=100
interactive_timeout=30
wait_timeout=100
connect_timeout = 20
thread_cache_size = 256
key_buffer_size=16M
join_buffer_size=2M
max_heap_table_size=16M
low_priority_updates=1
max_allowed_packet=128M
max_seeks_for_key=100
record_buffer=2M
sort_buffer_size=16M
read_buffer_size=16M
max_connect_errors=10
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=4
myisam_sort_buffer_size=64M
tmp_table_size= 64M
set-variable=table_cache=100
read_rnd_buffer_size=1M
skip-name-resolve

open_files_limit=6050
[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

and this is the error log

这是错误日志

140227 21:23:41 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140227 21:23:41 [Note] Plugin 'FEDERATED' is disabled.
140227 21:23:41 InnoDB: The InnoDB memory heap is disabled
140227 21:23:41 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
140227 21:23:41 InnoDB: Compressed tables use zlib 1.2.3
140227 21:23:41 InnoDB: Using Linux native AIO
140227 21:23:41 InnoDB: Initializing buffer pool, size = 128.0M
140227 21:23:41 InnoDB: Completed initialization of buffer pool
140227 21:23:41 InnoDB: highest supported file format is Barracuda.
140227 21:23:41  InnoDB: Waiting for the background threads to start
140227 21:23:42 InnoDB: 5.5.35 started; log sequence number 2155325
140227 21:23:42 [ERROR] /usr/sbin/mysqld: unknown variable 'set-variable=100'
140227 21:23:42 [ERROR] Aborting

140227 21:23:42  InnoDB: Starting shutdown...
140227 21:23:43  InnoDB: Shutdown completed; log sequence number 2155325
140227 21:23:43 [Note] /usr/sbin/mysqld: Shutdown complete

140227 21:23:43 mysqld_safe mysqld from pid file /var/lib/mysql/***/***.com.pid ended

how to fix this ? any idea

如何解决这个问题?任何的想法

采纳答案by GhostGambler

140227 21:23:42 [ERROR] /usr/sbin/mysqld: unknown variable 'set-variable=100'

remove the line from configuration file

从配置文件中删除该行

回答by Manoj Chandla

Try these commands :

试试这些命令:

root@vps [~]# killall -9 mysql mysqld
root@vps [~]# /etc/init.d/mysql  start

Hope this helps you!

希望这对你有帮助!

回答by Saurabh Chandra Patel

on MAC End any mysqlor mysqldtask (or other) in your Activity Monitorapplication.

在 MAC 上结束应用程序中的任何mysqlmysqld任务(或其他)Activity Monitor

or check you error by

或检查你的错误

tail -f /usr/local/mysql/data/XXXXX-MacBook-Pro.local.err

回答by user7462843

Make sure the user and group of /var/lib/mysqlis mysqlrecursively.

确保/var/lib/mysql的用户和组是mysql递归。

chown -R mysql:mysql /var/lib/mysql