暂无图片
mysql 5.6.39数据库无法启动还有救吗?
我来答
分享
Asky
2023-05-17
mysql 5.6.39数据库无法启动还有救吗?

InnoDB: ###### Diagnostic info printed to the standard error stream
InnoDB: Error: semaphore wait has lasted > 600 seconds
InnoDB: We intentionally crash the server, because it appears to be hung.
2023-05-16 15:25:34 7ff615485700 InnoDB: Assertion failure in thread 140694895744768 in file srv0srv.cc line 1757
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.
07:25:34 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=62
max_threads=1500
thread_count=17
connection_count=15
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 603387 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation

我来答
添加附件
收藏
分享
问题补充
5条回答
默认
最新
赵师的工作日

把配置文件发一下

暂无图片 评论
暂无图片 有用 0
Asky

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
character_set_server=utf8mb4
collation-server=utf8mb4_general_ci
init_connect='SET collation_connection = utf8mb4_general_ci'
init_connect='SET NAMES utf8mb4'
lower_case_table_names=1
max_connections=1500
long_query_time=2
slow_query_log=1
slow_query_log_file=/home/mysql/logs/slow-query.log
datadir=/home/mysql/data
socket=/var/lib/mysql/mysql.sock



port=13306
##innodb_force_recovery = 6
##innodb_purge_threads = 1

innodb_file_per_table= 1
innodb_open_files= 5000
innodb_buffer_pool_size= 10G
innodb_write_io_threads= 16
innodb_read_io_threads= 16
innodb_thread_concurrency = 0
innodb_purge_threads= 1
innodb_flush_log_at_trx_commit= 2
innodb_log_buffer_size=16M
innodb_log_file_size=512M
innodb_log_files_in_group= 5
innodb_max_dirty_pages_pct= 90
innodb_lock_wait_timeout= 120
innodb_adaptive_hash_index=0
key_buffer_size=8388608
read_buffer_size=131072
sort_buffer_size=275247
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

#log-bin=/home/mysql/logs/binlog
server_id=2
relay_log=/home/mysql/logs/relay-bin
log_slave_updates=1
expire_logs_days=30
read_only=on
#readonly=1
# Recommended in standard MySQL setup
##sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

explicit_defaults_for_timestamp=true
#skip-grant-tables=on
binlog_format=row
gtid_mode=ON
enforce_gtid_consistency=ON
log_slave_updates=1
log-bin=/home/mysql/binlog/binlog.bin

[mysqld_safe]
#log-error=/var/log/mysqld.log
#pid-file=/var/run/mysqld/mysqld.pid
log-error=/home/mysql/logs/mysqld.log
pid-file=/home/mysql/mysqld.pid

暂无图片 评论
暂无图片 有用 0
小蚂蚁

根据MySql的提示: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html  , innodb_force_recovery  设置下级别 1-6  从 1开始尝试, 这个启动下,看报错信息应该不会丢失数据。 不过现在已经挂了,就做一个冷备份吧 。然后在进行尝试

暂无图片 评论
暂无图片 有用 0
Asky

innodb_force_recovery  =6 设置了该参数也无法启动,这个问题应该不是表空间损坏的问题.

暂无图片 评论
暂无图片 有用 0
赵师的工作日

如果mysql实例都无法启动的话,确实是怀疑表空间已经损坏了。

建议备份数据目录和日志目录,通过修复表空间的方式恢复。

暂无图片 评论
暂无图片 有用 1
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏