gpt4 book ai didi

mysql - 当我在 my.cf 中取消注释 innodb 时,它会中断

转载 作者:行者123 更新时间:2023-11-30 00:45:20 25 4
gpt4 key购买 nike

我想知道为什么当我在/etc/my.cf 中取消注释以下行时,它会破坏 mysql 并且我无法重新启动它。我对 mysql 不太擅长,但我已经在谷歌上搜索了几个小时试图弄清楚它。 Innodb 正在我的服务器上运行,并且我的所有数据库都在运行 innodb。如果我可以为你们提供更多信息,请告诉我如何提供。

# Uncomment the following if you are using InnoDB tables 
#innodb_data_home_dir = /var/lib/mysql
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 384M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 100M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

编辑:这是 mysql 错误日志的内容

140129  8:53:21 [Note] Plugin 'FEDERATED' is disabled.
140129 8:53:21 InnoDB: The InnoDB memory heap is disabled
140129 8:53:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140129 8:53:21 InnoDB: Compressed tables use zlib 1.2.3
140129 8:53:21 InnoDB: Using Linux native AIO
140129 8:53:21 InnoDB: Initializing buffer pool, size = 384.0M
140129 8:53:21 InnoDB: Completed initialization of buffer pool
InnoDB: Error: data file /var/lib/mysql/ibdata1 is of a different size
InnoDB: 19072 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 128000 pages!
140129 8:53:21 InnoDB: Could not open or create data files.
140129 8:53:21 InnoDB: If you tried to add new data files, and it failed here,
140129 8:53:21 InnoDB: you should now edit innodb_data_file_path in my.cnf back
140129 8:53:21 InnoDB: to what it was, and remove the new ibdata files InnoDB created
140129 8:53:21 InnoDB: in this failed attempt. InnoDB only wrote those files full of
140129 8:53:21 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
140129 8:53:21 InnoDB: remove old data files which contain your precious data!
140129 8:53:21 [ERROR] Plugin 'InnoDB' init function returned error.
140129 8:53:21 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140129 8:53:21 [ERROR] Unknown/unsupported storage engine: InnoDB
140129 8:53:21 [ERROR] Aborting

最佳答案

要保存此内容,只需将以下内容添加到/etc/mysql/my.cnf 文件 ( reference ):

skip-innodb

关于mysql - 当我在 my.cf 中取消注释 innodb 时,它会中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21423848/

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