mysql服务器在macos上不通过mamp运行

pnwntuvh  于 2021-06-18  发布在  Mysql
关注(0)|答案(1)|浏览(525)

我将mamp pro 3.5.2版本升级到第5版,mysql启动失败。
我通过 killall -9 mysqld ,清理了日志文件,如 ib_logfile* 试着操纵 innodb recovery .
我拿到的日志是这样的: 2018-10-10T14:16:12.6NZ mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'. 2018-10-10T14:16:12.6NZ mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql57 2018-10-10T14:16:13.043096Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path. 2018-10-10T14:16:13.051110Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.23) starting as process 5538 ... 2018-10-10T14:16:13.064223Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql57/ is case insensitive 2018-10-10T14:16:13.074890Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2018-10-10T14:16:13.074926Z 0 [Note] InnoDB: Uses event mutexes 2018-10-10T14:16:13.074936Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2018-10-10T14:16:13.074943Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2018-10-10T14:16:13.074972Z 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB 2018-10-10T14:16:13.079521Z 0 [Note] InnoDB: Number of pools: 1 2018-10-10T14:16:13.084840Z 0 [Note] InnoDB: Using CPU crc32 instructions 2018-10-10T14:16:13.089357Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2018-10-10T14:16:13.114376Z 0 [Note] InnoDB: Completed initialization of buffer pool 2018-10-10T14:16:13.140491Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2018-10-10T14:16:13.145746Z 0 [ERROR] InnoDB: Trying to access page number 527111 in space 0, space name innodb_system, which is outside the tablespace bounds. Byte offset 0, len 16384, i/o type read. If you get this error at mysqld startup, please check that your my.cnf matches the ibdata files that you have in the MySQL server. 2018-10-10T14:16:13.145772Z 0 [ERROR] InnoDB: Server exits. 2018-10-10T14:16:13.6NZ mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended 如果您能告诉我该往哪个方向走,我将开始考虑卸载和重新安装mamp,这意味着我将丢失一些本地db安装。
谢谢!

idv4meu8

idv4meu81#

因此问题得到了解决,mysql通过mamp5.1在本地运行。
在弄清楚到底出了什么问题的时候 my.cnf 应用了以下设置:
增加 innodb_buffer_pool_size 价值: innodb_buffer_pool_size = 1024M 强制恢复模式已打开 innodb_force_recovery = 1 导致问题中提到的错误: [ERROR] InnoDB: Trying to access page number 527111 in space 0, space name innodb_system, which is outside the tablespace bounds. Byte offset 0, len 16384, i/o type read. If you get this error at mysqld startup, please check that your my.cnf matches the ibdata files that you have in the MySQL server. 此时,默认设置为 ibdata 目录和路径在中未注解 my.cnf : innodb_data_home_dir = "/Library/Application Support/appsolute/MAMP PRO/db/mysql57" innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = "/Library/Application Support/appsolute/MAMP PRO/db/mysql57" 错误日志报告访问限制(没有一个确切的句子在我面前),在这里丢失了一点,作为猜测措施,我扩展了文件夹的权限 /Library/Application Support/appsolute/MAMP PRO/db/mysql57 我的当前用户。
这并没有改变记录。关于错误路径的错误 ibdata 他还在那儿。
最后对文件夹进行重命名 mysql (完整版本的 ibdata (~40gb))到 mysql57 帮助。
中有以下文件夹结构 /Library/Application Support/appsolute/MAMP PRO/db/ 安装mamp 5.1后: -- mysql -- mysql56_TIMESTAMP -- mysql57 具有相同结构的文件,但仔细比较内容显示,完整版本的文件里面 mysql ,因此将其重命名,并在测试mamp在没有文件夹的情况下正常工作后删除所有文件夹。
所以现在我只有一个 mysql 文件夹中的 /Library/Application Support/appsolute/MAMP PRO/db/ . 的设置 my.cnf 我在这个过程中定制的。

相关问题