gpt4 book ai didi

mysql - 无法启动mysql服务器

转载 作者:行者123 更新时间:2023-11-29 14:32:58 25 4
gpt4 key购买 nike

我在启动 mysql 服务器时遇到问题,它工作正常,直到我复制“就绪”mysql 配置文件 (/usr/local/share/mysql/my-huge.cnf)到/etc/my.cnf,然后我重新启动了我的mysql服务器,不幸的是它停止了,而不是重新启动。

我没有任何控制台错误,但这出现在我的 /var/db/mysql/hostname.pid 文件中:

120312 17:57:43 mysqld_safe mysqld from pid file /var/db/mysql/hostname.pid ended
120312 17:58:09 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
120312 17:58:09 InnoDB: The InnoDB memory heap is disabled
120312 17:58:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120312 17:58:09 InnoDB: Compressed tables use zlib 1.2.3
120312 17:58:09 InnoDB: Initializing buffer pool, size = 128.0M
120312 17:58:09 InnoDB: Completed initialization of buffer pool
120312 17:58:09 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
120312 17:58:09 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
120312 17:58:09 InnoDB: Assertion failure in thread 34387018176 in file fsp0fsp.c line 2040
InnoDB: Failing assertion: inode
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.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
17:58:09 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 = 338444 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

120312 17:58:09 mysqld_safe mysqld from pid file /var/db/mysql/hostname.pid ended

怎么了?

最佳答案

您的 ibdata 文件大小错误。

更准确地说,您的 ibdata 文件的文件大小与您在新的 my.cnf 文件中指定的文件大小不同。检查旧版本和新版本的 my.cnf 文件中的 ibdata(以及 bin 日志文件,当您使用它时)的值 - 您会发现它们是不同的。

您将必须使用旧值来启动数据库;还要检查其中的其他 innodb 值:使所有重要的值相同(在运行后将其更改回来)。启动后,转储数据库,然后关闭 mysqld。编辑 my.cnf 文件,删除 ibdata,重新启动数据库,然后重新导入您的数据库。急速 - 已修复。

关于mysql - 无法启动mysql服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9672554/

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