mysql - Mac El Capitan 和 Mamp Pro 4.1 无法运行 MySQL

标签 mysql macos mamp mamp-pro

我遇到了一个完全难住我的问题。这里有一个小前言 - 我不是 MySQL 专家。我知道足够多的 MAMP 和一些终端,但这就是我的知识范围。

我最近升级到了 MAMP PRO 4.1(我使用的是 Mac OS 10.11.6),从那以后我就一直在抓狂。它不会运行 MySQL 并且错误日志返回此信息。

170123 18:52:07 mysqld_safe mysqld restarted
2017-01-23 18:52:07 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-01-23 18:52:07 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2017-01-23 18:52:07 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.6.34) starting as process 13145 ...
2017-01-23 18:52:07 13145 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql56/ is case insensitive
2017-01-23 18:52:07 13145 [Note] Plugin 'FEDERATED' is disabled.
/Applications/MAMP/Library/bin/mysqld: Table 'mysql.plugin' doesn't exist
2017-01-23 18:52:07 13145 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2017-01-23 18:52:07 13145 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-01-23 18:52:07 13145 [Note] InnoDB: The InnoDB memory heap is disabled
2017-01-23 18:52:07 13145 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-01-23 18:52:07 13145 [Note] InnoDB: Memory barrier is not used
2017-01-23 18:52:07 13145 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-01-23 18:52:07 13145 [Note] InnoDB: Not using CPU crc32 instructions
2017-01-23 18:52:07 13145 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-01-23 18:52:07 13145 [Note] InnoDB: Completed initialization of buffer pool
2017-01-23 18:52:07 13145 [Note] InnoDB: Highest supported file format is Barracuda.
2017-01-23 18:52:07 13145 [Note] InnoDB: Log scan progressed past the checkpoint lsn 57680420515
2017-01-23 18:52:07 13145 [Note] InnoDB: Database was not shutdown normally!
2017-01-23 18:52:07 13145 [Note] InnoDB: Starting crash recovery.
2017-01-23 18:52:07 13145 [Note] InnoDB: Reading tablespace information from the .ibd files...
2017-01-23 18:52:07 13145 [Note] InnoDB: Restoring possible half-written data pages 
2017-01-23 18:52:07 13145 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 57680420525
2017-01-23 18:52:07 13145 [Note] InnoDB: 128 rollback segment(s) are active.
2017-01-23 18:52:07 13145 [Note] InnoDB: 5.6.34 started; log sequence number 57680420525
2017-01-23 18:52:08 13145 [Note] RSA private key file not found: /Library/Application Support/appsolute/MAMP PRO/db/mysql56//private_key.pem. Some authentication plugins will not work.
2017-01-23 18:52:08 13145 [Note] RSA public key file not found: /Library/Application Support/appsolute/MAMP PRO/db/mysql56//public_key.pem. Some authentication plugins will not work.
2017-01-23 18:52:08 13109 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2017-01-23 18:52:08 13109 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2017-01-23 18:52:09 13109 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2017-01-23 18:52:09 13109 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
23:52:09 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.

key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 134277 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f91330cda00
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7fff590196d0 thread_stack 0x40000
0   mysqld                              0x0000000107131878 my_print_stacktrace + 72
1   mysqld                              0x0000000106df6fe8 handle_fatal_signal + 952
2   libsystem_platform.dylib            0x00007fff9580b52a _sigtramp + 26
3   mysqld                              0x0000000107b62c38 LOCK_plugin + 0
4   mysqld                              0x000000010701c223 _Z9get_fieldP11st_mem_rootP5Field + 99
5   mysqld                              0x0000000106e1d2d5 _ZL8acl_loadP3THDP10TABLE_LIST + 1941
6   mysqld                              0x0000000106e1c5b0 _Z10acl_reloadP3THD + 1264
7   mysqld                              0x0000000106e1c025 _Z8acl_initb + 405
8   mysqld                              0x000000010705b029 _Z11mysqld_mainiPPc + 2281
9   mysqld                              0x0000000106be7c22 main + 34
10  libdyld.dylib                       0x00007fff985a45ad start + 1

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
Connection ID (thread ID): 0
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

我尝试尽职调查并终止所有 mysqld 进程并尝试通过以下方式重新启动:

ps aux | grep mysqld
sudo kill <process id of mysqld here>

但是,当我运行它时,进程 ID 不再存在。它不断地启动、崩溃并尝试重新启动。如有任何帮助,我们将不胜感激。

最佳答案

我遇到了同样的问题并按如下方式修复:

  1. 退出 MAMP
  2. 在终端运行killall -9 mysqld
  3. 启动 MAMP

如果这不起作用,请尝试将 sudo 放在终端命令的开头。

参见http://twob.net/journal/fix-for-mamp-mysql/了解更多详细信息

关于mysql - Mac El Capitan 和 Mamp Pro 4.1 无法运行 MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41818269/

相关文章:

php - 另一个不起作用的动态表(搜索引擎)

php - 如何从表中选择数据并将其设为字符串?

macos - nvcc 未知选项 -no_pie

macos - MAMP 未在 El Capitan 10.11.1 上启动 Apache 服务器

MYSQL - 理解这个 SELECT 和 UNION ALL 查询

php - 柱形图的动态数据表创建(列和行未知)

c++ - 使用 Xcode 和 libc++ 时与 AutoSeededRandomPool 链接错误

macos - 如何将地址字符串转换为地址字典

apache - 虚拟主机无法在MAMP上运行

mysql - MAMP : Mysql won't turn on