OS X上的MySQL 5.7.9 El Capitan:错误服务器退出而不更新PID文件

Áng*_*ico 6 mysql macos pid server osx-elcapitan

我有一台带有OS X Yosemite的Mac Pro服务器,几天前我们升级到OS X El Capitan.当我尝试重新安装MySQL时出现问题.我进入官方MySQL页面并在DMG包中下载最新版本(5.7.9)并正常安装.
安装并重新启动服务器后,MySQL服务器没有自动启动,当手动启动时,我得到:

ERROR! The server quit without updating PID file (/usr/local/mysql/data/macServer.pid)
Run Code Online (Sandbox Code Playgroud)

我一直在互联网上尝试很多解决方案:

通过Brew安装MySQL后,我收到错误 - 服务器退出而不更新PID文件

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

mysql.server启动PID错误?

MySQL pid结束了(无法启动mysql)

我试图使用mysql.server restart,重启服务器.删除*.err文件,我也尝试创建自己的PID文件,但它已被自动删除.

一个可能的解决方案是完全卸载MySQL并重新安装:http://bytearrays.com/completely-uninstall-mysql-mac-osx/

另一个是修改.plist,但这个文件与提供的解决方案相同,所以它无法解决我的问题.

而且我仍然无法启动MySQL服务器.

我认为有两种可能性:一方面可能是我没有完全卸载MySQL而且有些东西做坏事另一方面是/etc/my.cnf文件的使用是问题所在.

我已经被困了2天了.我不知道如何运行服务器.

编辑1:执行的输出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
Run Code Online (Sandbox Code Playgroud)

我忘了把这个错误放在最初的问题上,这似乎是InnoDB上的一个错误(我不知道它是什么,如果有人能解释我是什么,我会非常感激).我也通过互联网查找此错误,我不记得我在哪里看到了解决方案,但我必须删除每个InnoDB日志文件(ib*文件),令人惊讶的是我找不到任何日志文件,所以我无法删除任何内容.我认为这可能是一个权限问题,但对哪些用户有什么权限?

New*_*ria 4

你的问题实际上不是Mysql,而是MariaDB的方案。问题是文件的权限aria_log_control

我通过安装了 mysql / mariadb brew,因此我:

  1. 将权限重置为 775 ( sudo chmod 775/usr/local/var/mysql/aria_log_control`)
  2. 删除日志文件(例如rm /usr/local/var/mysql/*.home.err
  3. 启动/停止 mysqld

其他来源声称您需要删除 mysql 目录。我的情况并非如此。