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

我有一台带有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)

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

After MySQL install via Brew,I get the error – The server quit without updating PID file

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

PID error on mysql.server start?

MySQL pid ended (cannot start mysql)

我尝试使用mysql.server重启,重启服务器.删除* .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

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

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

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

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

Other sources声称你需要删除mysql目录.对我来说情况并非如此.

相关文章

在正式开始之前,我们先来看下 MySQL 服务器的配置和版本号信...
> [合辑地址:MySQL全面瓦解](https://www.cnblogs.c...
物理服务机的CPU、内存、存储设备、连接数等资源有限,某个时...
1 回顾 上一节我们详细讲解了如何对数据库进行分区操作,包括...
navicat查看某个表的所有字段的详细信息 navicat设计表只能一...
文章浏览阅读4.3k次。转载请把头部出处链接和尾部二维码一起...