MySQL5.6未启动(将mamp 2迁移到mamp 4)

wswtfjt7  于 2021-06-25  发布在  Mysql
关注(0)|答案(1)|浏览(357)

新旧mamp:它们不启动mysql服务器。在升级到mamp4之前,我的mysql服务器在osx10.11.6elcapitan上运行正常。
现在使用mamp无法启动mysql服务器(并迁移我的旧数据库)。
注意:“工具>升级mysql数据库”在菜单栏中不可访问(仍然为灰色),但apache和php没有问题。
我对/applications/mamp/db/中所有文件的chmod是:

RW admin (group)
RW system
RW _mysql
RW _mysql (group)
RW everyone

/applications/mamp/tmp/mysql中所有文件的chmod为:

RW admin (group)
RW system
RW everyone

mysql上次日志错误:

161007 12:20:26 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql56
2016-10-07 12:20:27 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-10-07 12:20:27 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.6.28) starting as process 16615 ...
2016-10-07 12:20:27 16615 [Warning] Setting lower_case_table_names=2 because file system for /Applications/MAMP/db/mysql56/ is case insensitive
2016-10-07 12:20:27 16615 [Note] Plugin 'FEDERATED' is disabled.
2016-10-07 12:20:27 16615 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-10-07 12:20:27 16615 [Note] InnoDB: The InnoDB memory heap is disabled
2016-10-07 12:20:27 16615 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-10-07 12:20:27 16615 [Note] InnoDB: Memory barrier is not used
2016-10-07 12:20:27 16615 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-10-07 12:20:27 16615 [Note] InnoDB: Using CPU crc32 instructions
2016-10-07 12:20:27 16615 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-10-07 12:20:27 16615 [Note] InnoDB: Completed initialization of buffer pool
2016-10-07 12:20:27 16615 [Note] InnoDB: Highest supported file format is Barracuda.
2016-10-07 12:20:27 16615 [Note] InnoDB: Log scan progressed past the checkpoint lsn 8276492
2016-10-07 12:20:27 16615 [Note] InnoDB: Database was not shutdown normally!
2016-10-07 12:20:27 16615 [Note] InnoDB: Starting crash recovery.
2016-10-07 12:20:27 16615 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-10-07 12:20:27 16615 [Note] InnoDB: Restoring possible half-written data pages 
2016-10-07 12:20:27 16615 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 8280376
2016-10-07 12:20:27 16615 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
2016-10-07 12:20:27 16615 [Note] InnoDB: 128 rollback segment(s) are active.
2016-10-07 12:20:27 16615 [Note] InnoDB: Waiting for purge to start
2016-10-07 12:20:27 7000007ab000  InnoDB: Assertion failure in thread 123145310351360 in file dict0dict.cc line 3464
InnoDB: Failing assertion: for_table || ref_table
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
10:20:27 UTC - mysqld got signal 6 ;
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=8388608
read_buffer_size=131072
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 = 68101 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
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 = 0 thread_stack 0x40000
0   mysqld                              0x0000000106f73688 my_print_stacktrace + 72
1   mysqld                              0x0000000106c3a9e8 handle_fatal_signal + 952
2   libsystem_platform.dylib            0x00007fff9fa7d52a _sigtramp + 26
3   ???                                 0x020061d7b33d5471 0x0 + 144222767128859761
4   libsystem_c.dylib                   0x00007fff9f4f66df abort + 129
5   mysqld                              0x000000010700ba56 _Z25dict_foreign_add_to_cacheP14dict_foreign_tPPKcb17dict_err_ignore_t + 230
6   mysqld                              0x0000000107026dba _ZL17dict_load_foreignPKcPS0_bb17dict_err_ignore_t + 1674
7   mysqld                              0x000000010702601b _Z18dict_load_foreignsPKcPS0_bb17dict_err_ignore_t + 1115
8   mysqld                              0x0000000107024996 _Z15dict_load_tablePKcm17dict_err_ignore_t + 2246
9   mysqld                              0x0000000107026441 _Z21dict_load_table_on_idy17dict_err_ignore_t + 689
10  mysqld                              0x0000000107004098 _ZL25dict_table_open_on_id_lowy17dict_err_ignore_t + 184
11  mysqld                              0x0000000107003ee3 _Z21dict_table_open_on_idym15dict_table_op_t + 99
12  mysqld                              0x000000010717dc75 _ZL24row_purge_parse_undo_recP12purge_node_tPhPbP9que_thr_t + 229
13  mysqld                              0x000000010717d88f _ZL9row_purgeP12purge_node_tPhP9que_thr_t + 63
14  mysqld                              0x000000010717d741 _Z14row_purge_stepP9que_thr_t + 305
15  mysqld                              0x0000000107133d91 _ZL12que_thr_stepP9que_thr_t + 913
16  mysqld                              0x00000001071334eb _ZL19que_run_threads_lowP9que_thr_t + 123
17  mysqld                              0x00000001071332ee _Z15que_run_threadsP9que_thr_t + 110
18  mysqld                              0x00000001071bc15a _Z9trx_purgemmb + 778
19  mysqld                              0x00000001071aa673 _ZL12srv_do_purgemPm + 579
20  mysqld                              0x00000001071a9be7 srv_purge_coordinator_thread + 679
21  libsystem_pthread.dylib             0x00007fff9328e99d _pthread_body + 131
22  libsystem_pthread.dylib             0x00007fff9328e91a _pthread_body + 0
23  libsystem_pthread.dylib             0x00007fff9328c351 thread_start + 13
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.
161007 12:20:27 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
ou6hu8tu

ou6hu8tu1#

我遇到了完全相同的问题,这是我发现报告为问题的唯一地点(截至2017年2月10日)。
如果您不需要来自mamp 2的数据库内容,那么这很简单:
验证mysql没有运行(通过mamp gui和活动监视器或终端进程列表)
导航到/applications/mamp/db/mysql56
删除这三个文件:ib\u logfile0、ib\u logfile1和ibdata1
在mamp中重启mysql服务器
我在这里找到了这个解决方案:http://www.randombugs.com/linux/crash-innodb-table.html. 注意,默认情况下,ibdata文件是innodb存储表中数据的地方(https://serverfault.com/questions/487159/what-is-the-ibdata1-file-in-my-var-lib-mysql-directory)因此,在删除这些文件之前备份它们是很好的;万一出了问题,您可以恢复到非工作配置。
另一方面,如果您需要mamp 2数据库的内容,那么您将需要在较旧/工作版本中完成它们的备份,最好是mysql转储,以便恢复与复制/粘贴一样简单。幸运的是,我有一个备份,所以除了删除上面列出的“ib…”文件外,我还删除了我打算还原的数据库的目录,这样我就可以用“create database…”开始还原了。
我不知道这是否是mamp、mysql、osx的一个bug,但这是对我有效的解决方案。我能够恢复我关心的数据库,只是不担心丢失我没有备份的其他数据库。
技术数据:
旧的mamp版本2.1.2
旧mysql版本4.0.10.14
新的mamp版本4.1.1
新mysql版本5.6.35
mac os 10.12.3版

相关问题