暂无图片
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
打赏 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
打赏 0
小蚂蚁

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

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

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

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

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

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

暂无图片 评论
暂无图片 有用 1
打赏 0
回答交流
Markdown


请输入正文
提交
相关推荐
rman 备份归档日志倒 备机
回答 2
open之前你可以先alterdatabaserecovermanagedstandbydatabase;让它自己去拉日志恢复一下然后cancel再open
openGauss的MOT引擎和MySQL的内存引擎类似吗?
回答 1
1、openGauss引入了MOT(MemoryOptimizedTable)存储引擎,它是一种事务性行存储,针对多核和大内存服务器进行了优化。可以实现高性能、高吞吐、可预测低延迟以及多核服务器的高利
MySQL5.6和5.7主从同步,从库的sql_thread执行很慢,有什么优化的方法?
回答 1
看看从库的负载情况,以及有没有锁?
打开performance_schema中对memory的收集对数据库性能有影响吗
回答 2
好的,谢谢
mysql怎么自定义执行时长?
回答 2
selectsleep(n)fromtable?  值得注意的是。这个执行时间 是n记录数。
mysql超大表如何加字段影响最小
回答 1
ptosc,ghost这两个工具。假设每秒迁移1000条数据,也只需要3万秒,十个小时左右。建议直接使用上面提到的工具迁移。如果确实担心的话,还有个动作更大的办法:设置复制模式为statement新部
MySQL区分大小写吗?
回答 1
已采纳
在MySQL中,一个数据库会对应一个文件夹,数据库里的表会以文件的方式存放在文件夹内,所以,操作系统对大小写的敏感性决定了数据库和表的大小写敏感性。其实,在MySQL中,有一个只读的系统变量“lowe
求问,mysql怎么做备份才能做到能够恢复到最新的时间节点
回答 5
全量备份binlog可以实现恢复到指定时间点;1.全备恢复过程省略2.binlog增量恢复大致过程可以使用mysqlbinlog命令解析binlog到sql文件,再将SQL文件导入到库里面。/data
mgr集群搭建遇到的问题,求大佬帮忙看看。
回答 11
已采纳
暂无文字回复
如何用navicat通过跳板机访问到内网MySQL数据库?
回答 2
通过跳板机不知道。但是我们有些mac不支持堡垒机的,倒是可以在navicat中进行设置,有个SSL配置,输入堡垒机的地址和数据库的地址。可以连接过去。