Mysql 启动问题| 错误!服务器退出而不更新PID文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12627604/
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
Mysql start up issues | ERROR! The server quit without updating PID file
提问by Polygon Pusher
Any Ideas?
有任何想法吗?
Joshs-MacBook-Pro:cdwhp joshc$ mysql.server start
Starting MySQL
.. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Joshs-MacBook-Pro.local.pid).
Error Logs
错误日志
120927 13:08:35 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
120927 13:08:36 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
120927 13:08:36 InnoDB: The InnoDB memory heap is disabled
120927 13:08:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120927 13:08:36 InnoDB: Compressed tables use zlib 1.2.5
120927 13:08:36 InnoDB: Initializing buffer pool, size = 128.0M
120927 13:08:36 InnoDB: Completed initialization of buffer pool
120927 13:08:36 InnoDB: highest supported file format is Barracuda.
120927 13:08:36 InnoDB: Waiting for the background threads to start
120927 13:08:37 InnoDB: 1.1.8 started; log sequence number 9531786
120927 13:08:37 [ERROR] /usr/local/Cellar/mysql/5.5.27/bin/mysqld: unknown variable 'default-character-set=utf8'
120927 13:08:37 [ERROR] Aborting
120927 13:08:37 InnoDB: Starting shutdown...
120927 13:08:37 InnoDB: Shutdown completed; log sequence number 9531786
120927 13:08:37 [Note] /usr/local/Cellar/mysql/5.5.27/bin/mysqld: Shutdown complete
120927 13:08:37 mysqld_safe mysqld from pid file /usr/local/var/mysql/Joshs-MacBook-Pro.local.pid ended
采纳答案by Joachim Isaksson
The option default-character-set
was removed in MySQL 5.5.3.
该选项default-character-set
已在 MySQL 5.5.3 中删除。
You should change it in my.cnf
to the alternative;
您应该将其更改my.cnf
为替代方案;
回答by Vladimir Kroz
Complete reinstall of mysql solved this problem in my case:
在我的情况下,完全重新安装 mysql 解决了这个问题:
brew uninstall mysql
rm -Rf /usr/local/var/mysql
brew install mysql
mysql.server start
Note: use this as last resort, all data will be deleted
注意:将此作为最后的手段,所有数据将被删除
回答by colefner
I also had the same problem. I was doing
我也有同样的问题。我在做
sudo mysql.server start
What I really should have been doing was running the command as my user (not su)
我真正应该做的是以我的用户身份运行命令(不是 su)
mysql.server start
Hope this helps someone.
希望这可以帮助某人。
回答by seanm1985
I hope this helps but, I was having the same issue after I accidentally left mysql server running for a few days. I was getting ERROR! The server quit without updating PID file (/usr/local/mysql/data/[NAS].pid).
我希望这会有所帮助,但是,在我不小心让 mysql 服务器运行了几天后,我遇到了同样的问题。我收到错误!服务器退出而不更新 PID 文件 (/usr/local/mysql/data/[NAS].pid)。
I was able to fix it by typing
我可以通过输入来修复它
sudo kill 10191
- the process number for mysql on my computer
sudo kill 10191
- 我电脑上mysql的进程号
Then started up mysql again and it worked like fine. I hope this helps someone out of the same jam.
然后再次启动 mysql,它工作得很好。我希望这可以帮助某人摆脱同样的困境。
回答by JeffChen
I found the log in bogon.log
我找到了登录 bogon.log
InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created! 2016-03-27T14:45:36.200398Z 0 [ERROR] InnoDB: redo log file './ib_logfile0' exists. Creating system tablespace with existing redo log files is not recommended. Please delete all redo log files before creating new system tablespace. `
InnoDB:第一个 innodb_system 数据文件 'ibdata1' 不存在。将创建一个新表空间!2016-03-27T14:45:36.200398Z 0 [错误] InnoDB:重做日志文件“./ib_logfile0”存在。不建议使用现有的重做日志文件创建系统表空间。请在创建新系统表空间之前删除所有重做日志文件。`
so I delete
the ib*
and mysql.server restart
, that's work
所以我delete
的ib*
和mysql.server restart
,即工作
回答by Chris
use
用
`mysql.server status;` - tells you the process number/s
`sudo kill ######;` - enter process number repeat as needed
`mysql.server start;` - start everything up again
worked for me
为我工作
回答by Alexey Sergeev
I had a similar issue. Somehow the files YourComputerName.pid
and "YourComputerName.err" in /usr/local/mysql/data
were created under _mysql user. I just removed those files and started the sql server with the following command /usr/local/mysql/support-files/mysql.server start
我有一个类似的问题。不知何故,文件YourComputerName.pid
和“YourComputerName.err”/usr/local/mysql/data
是在 _mysql 用户下创建的。我刚刚删除了这些文件并使用以下命令启动了 sql server/usr/local/mysql/support-files/mysql.server start
回答by Yetaimei
delete file /usr/local/var/mysql/*********.local.err
run mysql.server start
删除文件/usr/local/var/mysql/*********.local.err
运行mysql.server start