2

My issues have spawned from file permission changes leading to the popular ERROR! MySQL server PID file could not be found! error. However, I believe I've repaired them, but still cannot restart MySQL. The error logs suggest I might have more than one instance running or controlling those logs:

2016-12-27T22:13:00.249235Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 35 2016-12-27T22:13:00.249281Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files

I'm on OS X 10.11 (El Capitan).

Below is the exact sequence of PS, kill statements, with little effect:

admin@Admins-MacBook-Pro-3:/usr/local/mysql/data$ ps -ef | grep mysql
   74  4257     1   0 12:36PM ??         0:00.54 /usr/local/mysql/bin/mysqld --user=_mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/mysqld.local.err --pid-file=/usr/local/mysql/data/mysqld.local.pid
   74  4497     1   0 12:36PM ??         0:00.30 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/localhost.err --pid-file=/usr/local/mysql/data/localhost.pid
    0  4502     1   0 12:36PM ??         0:00.03 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
   74  4597  4502   0 12:36PM ??         0:00.29 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/Admins-MacBook-Pro-3.local.err --pid-file=/usr/local/mysql/data/Admins-MacBook-Pro-3.local.pid
  501  4829   474   0 12:37PM ttys000    0:00.00 grep mysql
admin@Admins-MacBook-Pro-3:/usr/local/mysql/data$ sudo kill -9 4257
admin@Admins-MacBook-Pro-3:/usr/local/mysql/data$ sudo kill -9 4497
kill: 4497: No such process
admin@Admins-MacBook-Pro-3:/usr/local/mysql/data$ sudo kill -9 4502
admin@Admins-MacBook-Pro-3:/usr/local/mysql/data$ sudo kill -9 4597
kill: 4597: No such process
admin@Admins-MacBook-Pro-3:/usr/local/mysql/data$ ps -ef | grep mysql
   74  4945     1   0 12:37PM ??         0:00.41 /usr/local/mysql/bin/mysqld --user=_mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/mysqld.local.err --pid-file=/usr/local/mysql/data/mysqld.local.pid
    0  5253     1   0 12:37PM ??         0:00.03 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
   74  5346  5253   0 12:37PM ??         0:00.29 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/Admins-MacBook-Pro-3.local.err --pid-file=/usr/local/mysql/data/Admins-MacBook-Pro-3.local.pid
  501  5460   474   0 12:37PM ttys000    0:00.00 grep mysql
admin@Admins-MacBook-Pro-3:/usr/local/mysql/data$ 

My MySQL related file permissions:

admin@Admins-MacBook-Pro-3:/usr/local$ sudo ls -l /usr/local/mysql/data/
total 574440
-rw-r-----    1 _mysql  wheel     51807 Dec 27 11:57 Admins-MacBook-Pro-3.local.err
-rwxrwxrwx    1 _mysql  wheel         4 Nov 29 16:09 Admins-MacBook-Pro.local.pid
-rw-r-----    1 _mysql  wheel        56 Dec 26 23:51 auto.cnf
-rw-r-----    1 _mysql  wheel       657 Dec 27 11:18 ib_buffer_pool
-rwxrwxrwx    1 _mysql  wheel  50331648 Dec 27 11:33 ib_logfile0
-rwxrwxrwx    1 _mysql  wheel  50331648 Dec 26 19:48 ib_logfile0.bak
-rwxrwxrwx    1 _mysql  wheel  50331648 Dec 26 19:49 ib_logfile1
-rwxrwxrwx    1 _mysql  wheel  50331648 Dec 26 01:20 ib_logfile1.bak
-rwxrwxrwx    1 _mysql  wheel  79691776 Dec 27 11:33 ibdata1
-rw-r-----    1 _mysql  wheel  12582912 Dec 27 11:33 ibtmp1
-rw-r-----    1 _mysql  wheel      7513 Dec 27 11:33 localhost.err
-rw-r-----    1 _mysql  wheel         5 Dec 27 11:33 localhost.pid
drwxrwxrwx   77 _mysql  wheel      2618 Oct 10 00:13 mysql
-rw-r-----    1 _mysql  wheel    430223 Dec 27 12:00 mysqld.local.err
drwxrwxrwx   90 _mysql  wheel      3060 Oct 10 00:13 performance_schema
drwxrwxrwx  108 _mysql  wheel      3672 Oct 10 00:13 sys
drwxrwxrwx   23 _mysql  wheel       782 Oct 19 10:12 someprojects

admin@Admins-MacBook-Pro-3:/usr/local$ sudo ls -l /usr/local/Cellar/mysql/5.7.15/ > [all is drwxrwxrwx   9 root  wheel]

admin@Admins-MacBook-Pro-3:/usr/local$ ls -l /tmp/
total 8 -rw-------  1 _mysql  staff     5B Dec 27 11:33 mysql.sock.lock
admin@Admins-MacBook-Pro-3:/usr/local$ ls -l /var/mysql/
total 8 lrwxr-xr-x  1 _mysql  wheel    15B Oct 10 02:21 mysql.sock@ -> /tmp/mysql.sock

my.cfn

[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.