gpt4 book ai didi

mysql - 更改MySQL数据库的数据文件夹

转载 作者:行者123 更新时间:2023-11-29 00:47:59 25 4
gpt4 key购买 nike

我试图通过更改 my.ini 文件中的 datadir 参数来更改 MySQL 的数据文件夹路径。但是当我再次重新启动 MySQL 服务时,出现以下错误:

Error 1067: the process terminated unexpectedly.

我检查了 .err 文件,存在以下错误:(它们都是关于 InnoDB 的)

120319  3:59:59 [Note] Plugin 'FEDERATED' is disabled.  
120319 3:59:59 InnoDB: The InnoDB memory heap is disabled
120319 3:59:59 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120319 3:59:59 InnoDB: Compressed tables use zlib 1.2.3
120319 3:59:59 InnoDB: Initializing buffer pool, size = 75.0M
120319 3:59:59 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 99614720 bytes
InnoDB: than specified in the .cnf file 0 39845888 bytes!
120319 3:59:59 [ERROR] Plugin 'InnoDB' init function returned error.
120319 3:59:59 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120319 3:59:59 [ERROR] Unknown/unsupported storage engine: INNODB
120319 3:59:59 [ERROR] Aborting

最佳答案

您必须为以下各项指定正确的尺寸:innodb_log_file_size=95M 在你的 my.cnf 或 my.ini 中。我猜它目前指定为 38M。

同时从您的数据文件夹中检查您有多少 ib_logfiles。如果超过 2 个,还要指定:innodb_log_files_in_group=2。

关于mysql - 更改MySQL数据库的数据文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9769104/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com