Reputation: 387
Installing MySQL on OSX El Capitan. 10.11.2 via Homebrew next I want to start it:
Nevada3:local kb1$ mysql.server start
Starting MySQL
.. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Nevada3.local.pid).
Next I checked the permissions:
Nevada3:mysql kb1$ cd /usr/local/var/mysql/
Nevada3:mysql kb1$ ls -lsa
total 221296
0 drwxr-xr-x 19 kb1 admin 646 9 Dec 11:40 .
0 drwxr-xr-x 6 kb1 admin 204 9 Dec 11:36 ..
32 -rw-r----- 1 kb1 admin 15184 9 Dec 11:40 Nevada3.local.err
8 -rw-r----- 1 kb1 admin 56 9 Dec 11:36 auto.cnf
8 -rw------- 1 kb1 admin 1676 9 Dec 11:36 ca-key.pem
8 -rw-r--r-- 1 kb1 admin 1071 9 Dec 11:36 ca.pem
8 -rw-r--r-- 1 kb1 admin 1079 9 Dec 11:36 client-cert.pem
8 -rw------- 1 kb1 admin 1680 9 Dec 11:36 client-key.pem
8 -rw-r----- 1 kb1 admin 303 9 Dec 11:40 ib_buffer_pool
98304 -rw-r----- 1 kb1 admin 50331648 9 Dec 11:40 ib_logfile0
98304 -rw-r----- 1 kb1 admin 50331648 9 Dec 11:36 ib_logfile1
24576 -rw-r----- 1 kb1 admin 12582912 9 Dec 11:40 ibdata1
0 drwxr-x--- 77 kb1 admin 2618 9 Dec 11:36 mysql
0 drwxr-x--- 90 kb1 admin 3060 9 Dec 11:36 performance_schema
8 -rw------- 1 kb1 admin 1680 9 Dec 11:36 private_key.pem
8 -rw-r--r-- 1 kb1 admin 452 9 Dec 11:36 public_key.pem
8 -rw-r--r-- 1 kb1 admin 1079 9 Dec 11:36 server-cert.pem
8 -rw------- 1 kb1 admin 1676 9 Dec 11:36 server-key.pem
0 drwxr-x--- 108 kb1 admin 3672 9 Dec 11:36 sys
Nevada3:mysql kb1$
But this seems right. All is my User. And not root.
This is the output of the error log:
Nevada3:mysql kb1$ tail Nevada3.local.err
2015-12-09T10:40:45.576656Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2471965
2015-12-09T10:40:45.577321Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2015-12-09T10:40:45.577335Z 0 [Note] Shutting down plugin 'MEMORY'
2015-12-09T10:40:45.577341Z 0 [Note] Shutting down plugin 'CSV'
2015-12-09T10:40:45.577346Z 0 [Note] Shutting down plugin 'sha256_password'
2015-12-09T10:40:45.577350Z 0 [Note] Shutting down plugin 'mysql_native_password'
2015-12-09T10:40:45.577470Z 0 [Note] Shutting down plugin 'binlog'
2015-12-09T10:40:45.577946Z 0 [Note] /usr/local/Cellar/mysql/5.7.9/bin/mysqld: Shutdown complete
151209 11:40:45 mysqld_safe mysqld from pid file /usr/local/var/mysql/Nevada3.local.pid ended
I am totally lost. Never experienced this..
Upvotes: 1
Views: 3518
Reputation: 2703
I had the same issue. Mysql would not start up after upgrading to 10.11.2.
Worked again after:
sudo chown -R `whoami` /usr/local/var/mysql
mv ib_logfile0 ib_logfile0.bak
mv ib_logfile1 ib_logfile1.bak
[move the .err logfile to a new location]
Not sure if all of them were needed.
Edit:
shortcut of creating the .bak files:
for i in $(ls *.err *logfile*); do mv $i{,.bak}; done
Upvotes: 1
Reputation: 2466
I just had and resolved this issue in the following manner:
cd /usr/local/var/mysql/
ls
to see files in this directory, there should be an err file (which is preventing the pid and thus the start) rm -rf Nevada3.local.err
These steps worked for me. From my understanding, this occurs because mysql server is running durning the update, eventually causes an error creating the error file, preventing the start upon successful update. I think stoping mysql immediately before the updating will prevent this issue in the future. You would of course have to restart mysql after the update, but would not need to find and delete the .err file.
Upvotes: 1