MySQL 5.7.9 on OS X El Capitan: ERROR Server shuts down without updating PID file

I have a Mac Pro Server with OS X Yosemite, a few days ago we upgraded to OS X El Capitan. The problem occurs when I try to reinstall MySQL. I went to the official MySQL page and downloaded the latest version (5.7.9) into the DMG package and installed it as usual.
After installing and rebooting the server, the MySQL server did not start automatically, and when I start manually, I get:

ERROR! The server quit without updating PID file (/usr/local/mysql/data/macServer.pid) 

I have tried many solutions over the Internet:

After installing MySQL via Brew, I get an error - the server shuts down without updating the PID file

http://coolestguidesontheplanet.com/mysql-error-server-quit-without-updating-pid-file/

PID error when starting mysql.server?

MySQL pid completed (mysql cannot start)

I tried using mysql.server restart , restart the server. Delete the *.err files, and I also tried to create my own PID file, but it was deleted automatically.

A possible solution was to completely remove MySQL and reinstall: http://bytearrays.com/completely-uninstall-mysql-mac-osx/

Another option is to change the .plist , but these files were identical to the solutions offered, so they cannot solve my problem.

And still I can not start the MySQL server.

I think there are two possibilities: in one hand it may be that I did not completely delete MySQL, and there is something bad, but on the other hand it is a problem with the /etc/my.cnf file.

I am already stuck for 2 days. I do not know what to do to start the server.

Edit 1: The result of running sudo mysqld --user=mysql :

 simidat-apps:~ admin$ sudo mysqld --user=mysql Password: 2015-11-18 9:08:36 140735160397824 [Note] mysqld (mysqld 10.1.8-MariaDB) starting as process 81030 ... 2015-11-18 9:08:36 140735160397824 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive 2015-11-18 9:08:36 140735160397824 [ERROR] mysqld: File '/usr/local/var/mysql/aria_log_control' not found (Errcode: 13 "Permission denied") 2015-11-18 9:08:36 140735160397824 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/usr/local/var/mysql/aria_log_control' 2015-11-18 9:08:36 140735160397824 [ERROR] Plugin 'Aria' init function returned error. 2015-11-18 9:08:36 140735160397824 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed. 2015-11-18 9:08:36 140735160397824 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2015-11-18 9:08:36 140735160397824 [Note] InnoDB: The InnoDB memory heap is disabled 2015-11-18 9:08:36 140735160397824 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2015-11-18 9:08:36 140735160397824 [Note] InnoDB: Memory barrier is not used 2015-11-18 9:08:36 140735160397824 [Note] InnoDB: Compressed tables use zlib 1.2.5 2015-11-18 9:08:36 140735160397824 [Note] InnoDB: Using CPU crc32 instructions 2015-11-18 9:08:36 140735160397824 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2015-11-18 9:08:36 140735160397824 [Note] InnoDB: Completed initialization of buffer pool 2015-11-18 9:08:36 140735160397824 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode 2015-11-18 9:08:36 140735160397824 [ERROR] InnoDB: The system tablespace must be writable! 2015-11-18 9:08:36 140735160397824 [ERROR] Plugin 'InnoDB' init function returned error. 2015-11-18 9:08:36 140735160397824 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2015-11-18 9:08:36 140735160397824 [Note] Plugin 'FEEDBACK' is disabled. 2015-11-18 9:08:36 140735160397824 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded 2015-11-18 9:08:36 140735160397824 [ERROR] Unknown/unsupported storage engine: InnoDB 2015-11-18 9:08:36 140735160397824 [ERROR] Aborting 

I forgot to put this error on the initial question, it looks like an error in InnoDB (I don’t know what it is, and if someone can explain to me what it is, I will be very grateful). I also searched for this error on the Internet, I don’t remember where I saw the solution, but I need to delete every InnoDB log file ( ib* ), and, surprisingly, I can’t find the log file so that I can’t "Delete that "Something. I think it might be permission problems, but what permissions are for which user?"

+5
source share
3 answers

Your problem is not really Mysql, but rather on the MariaDB schema. The problem is the permissions for the aria_log_control file.

I installed mysql / mariadb via brew , and thus I:

  • reset perms to 775 ( sudo chmod 775 / usr / local / var / mysql / aria_log_control`)
  • deleted the log file (e.g. rm /usr/local/var/mysql/*.home.err )
  • start / stop mysqld

Other sources claim that you need to remove dir mysql. That was not for me.

+3
source

According to the answer given in github , change the mysqld user to user: -

Create /usr/local/etc/my.cnf.d/user.cnf

And add the following lines: -

 [mysqld] user=YOUR_USER_NAME 

OSX Sierra 10.12.1 / MariaDB 10.1.19

https://github.com/Homebrew/legacy-homebrew/issues/50670

(I tried changing the permissions in the aria_log_control file, but they could not stand the reboot).

0
source

Another thing to check is the correct permissions for all parent directories above the mysql data directory.

For example, verify that the rights to / var are correct and that the rights to / var / lib / are correct.

In my case, my / var permissions were mixed up, and the mysql user was not able to access the var directory at all.

One way to test sanity is to switch to a regular user and make sure that the regular user can use cd for / var and / var / lib (assuming the dir mysql file is inside / var / lib).

0
source

Source: https://habr.com/ru/post/1236193/


All Articles