The server quit without updating PID file 报错

mysql.server start

报错:The server quit without updating PID file (/usr/local/var/mysql/zhangzhenxingdeMacBook-Pro.local.pid).

最后还是重新安装!!以前数据库内容丢失。

I think one can end up in this position with older versions of mysql already installed. I had the same problem and none of the above solutions worked for me. I fixed it thus:

Used brew’s remove & cleanup commands, unloaded the launchctl script, then deleted the mysql directory in /usr/local/var , deleted my existing /etc/my.cnf (leave that one up to you, should it apply) and launchctl plist

Updated the string for the plist. Note also your alternate security script directory will be based on which version of MySQL you are installing.

Step-by-step:

1 brew remove mysql
2
3 brew cleanup
4
5 launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
6
7 rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
8
9 sudo rm -rf /usr/local/var/mysql

I then started from scratch:

  1. installed mysql with brew install mysql
  2. ran the commands brew suggested:

    1 unset TMPDIR
    2
    3 mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
  3. Start mysql with mysql.server start command, to be able to log on it
  4. Used the alternate security script:

    /usr/local/Cellar/mysql/5.5.10/bin/mysql_secure_installation
  5. Followed the launchctl section from the brew package script output such as,

    #start
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    
    #stop
    launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
  6. Boom.

Hope that helps someone!

时间: 2024-10-05 23:50:16

The server quit without updating PID file 报错的相关文章

启动mysql报错 -- ERROR! The server quit without updating PID file

开发说某个测试环境的mysql,无法重启了,报以下错误提示: # service mysqld restart Shutting down MySQL.. SUCCESS! Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/test.pid). # ps -ef|grep mysql|grep -v grep avahi 697 1 0 Sep16 ? 00:00:02

新安装的MySQL启动报错The server quit without updating PID file

安装的MySQL启动报错The server quit without updating PID file [[email protected] mysql]# service mysqld restart MySQL server PID file could not be found!                  [失败] Starting MySQL.The server quit without updating PID file (/[失败]ysql/l ocalhost.loc

mysql启动报错 The server quit without updating PID file

[[email protected] data]# /etc/init.d/mysqld startStarting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql/data/uz6542.pid). 解决方法:初始化mysql /usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/d

Mysql启报错报The server quit without updating PID file

mysql 安装时候安装后启动不成功报错: Starting MySQL.. ERROR! The server quit without updating PID file (/data/mysql/26765574162f.pid). 查看报错日志: [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 解决办法: 1.编辑配置文件: vim /etc/my.cn

缺乏libaio包导致报The server quit without updating PID file

背景: 直接解压安装mysql5.7.18,解压mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz,直接拷贝另外一台数据库的数据目录,启动mysql过程无日志输出,报ERROR! The server quit without updating PID file (/r2/mysqldata/ai244.pid). 排查过程: 重新初始化中......报 bin/mysqld: error while loading shared libraries: libai

mysql修改后启动my.cnf报错Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

mysql中文乱码解决 mysql修改my.cnf后启动报错Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid). 这里简单明了地说下: 对于mysql5.5版本,需要在/etc/mysql/my.cnf做如下修改: [client]下添加: default-character-set = utf8 [mysqld]下添加: cha

Linux mysql 报错:MYSQL:The server quit without updating PID file

[[email protected] ~]# service mysqld startStarting MySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid). 1.可能是/usr/local/mysql/data/rekfan.pid文件没有写的权限解决方法 :给予权限,执行 “chown -R mysql:mysql /usr/local/mysql

lnmp下启动mysql报错 The server quit without updating PID file

启动时候错误代码:Starting MySQL[FAIL.] The server quit without updating PID file (/var/run/mysqld/mysqld.pid). ... failed! lnmp作者军哥给的解答是:     这里面没有任何错误信息,按[FAIL.] The server quit without updating PID file (/var/run/mysqld/mysqld.pid     这个看可能又另外安装了mysql或存在其他

mysql启动报错:Starting MySQL... ERROR! The server quit without updating PID file

mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解决方法: 首先看一下我的mysql的配置文件的配置: cat /usr/local/mysql/my.cnf [mysqld] basedir = /usr/local/mysql datadir = /opt/mysql/data port = 3306 server_id = 1