记一次数据崩溃无法启动
发表于:2024-09-22 作者:千家信息网编辑
千家信息网最后更新 2024年09月22日,场景:远程拷贝的/var/lib/mysql/*的所有文件打包后拖到本地后无法启动。(导表因为数据库太大导表相当漫长,偷懒了....启动时一同报错....),版本:sys:Linux console
千家信息网最后更新 2024年09月22日记一次数据崩溃无法启动
场景:
远程拷贝的/var/lib/mysql/*的所有文件打包后拖到本地后无法启动。(导表因为数据库太大导表相当漫长,偷懒了....启动时一同报错....),
版本:
sys:
Linux console 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
DB:
Server version: 5.5.60-MariaDB MariaDB Server
报错信息:
数据库日志:
#tailf /var/log/mariadb/mariadb.logServer version: 5.5.60-MariaDBkey_buffer_size=134217728read_buffer_size=131072max_used_connections=0max_threads=153thread_count=0It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 466718 K bytes of memoryHope that's ok; if not, decrease some variables in the equation.Thread pointer: 0x0Attempting backtrace. You can use the following information to find outwhere mysqld died. If you see no messages after this, something wentterribly wrong...stack_bottom = 0x0 thread_stack 0x48000190119 12:54:23 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended190119 12:55:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql190119 12:55:54 [Note] /usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 10885 ...190119 12:55:54 InnoDB: The InnoDB memory heap is disabled190119 12:55:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins190119 12:55:54 InnoDB: Compressed tables use zlib 1.2.7190119 12:55:54 InnoDB: Using Linux native AIO190119 12:55:54 InnoDB: Initializing buffer pool, size = 128.0M190119 12:55:54 InnoDB: Completed initialization of buffer pool190119 12:55:54 InnoDB: highest supported file format is Barracuda.190119 12:55:54 InnoDB: Starting crash recovery from checkpoint LSN=25825591529InnoDB: Restoring possible half-written data pages from the doublewrite buffer...190119 12:55:54 InnoDB: Starting final batch to recover 15 pages from redo log190119 12:55:54 [ERROR] mysqld got signal 11 ;This could be because you hit a bug. It is also possible that this binaryor one of the libraries it was linked against is corrupt, improperly built,or misconfigured. This error can also be caused by malfunctioning hardware.To report this bug, see http://kb.askmonty.org/en/reporting-bugsWe will try our best to scrape up some info that will hopefully helpdiagnose the problem, but since we have already crashed, something is definitely wrong and this may fail.Server version: 5.5.60-MariaDBkey_buffer_size=134217728read_buffer_size=131072max_used_connections=0max_threads=153thread_count=0It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 466718 K bytes of memoryHope that's ok; if not, decrease some variables in the equation.Thread pointer: 0x0Attempting backtrace. You can use the following information to find outwhere mysqld died. If you see no messages after this, something went
服务状态:
#systemctl status mariadb● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2019-01-19 12:49:08 CST; 3s ago Process: 9550 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE) Process: 9549 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS) Process: 9517 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 9549 (code=exited, status=0/SUCCESS)Jan 19 12:49:06 console systemd[1]: Starting MariaDB database server...Jan 19 12:49:06 console mariadb-prepare-db-dir[9517]: Database MariaDB is probably initialized in /var/lib/mysql alreJan 19 12:49:06 console mariadb-prepare-db-dir[9517]: If this is not the case, make sure the /var/lib/mysql is empty Jan 19 12:49:06 console mysqld_safe[9549]: 190119 12:49:06 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.Jan 19 12:49:06 console mysqld_safe[9549]: 190119 12:49:06 mysqld_safe Starting mysqld daemon with databases from /vaJan 19 12:49:08 console systemd[1]: mariadb.service: control process exited, code=exited status=1Jan 19 12:49:08 console systemd[1]: Failed to start MariaDB database server.Jan 19 12:49:08 console systemd[1]: Unit mariadb.service entered failed state.Jan 19 12:49:08 console systemd[1]: mariadb.service failed.
解决方式:
(1)修改配置文件:
添加参数:
innodb_force_recovery = 6 (此项由1---6个级别一次往上修改参数在失败的情况下)
innodb_purge_threads = 0
(2)修改刚才解压的文件属主属组为mysql用户。
我的数据库配置文件:
[mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.socklower_case_table_name=1character_set_server=utf8skip_name_resolvebind-address = 0.0.0.0innodb_force_recovery = 6 innodb_purge_threads = 0# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0# Settings user and group are ignored when systemd is used.# If you need to run mysqld under a different user or group,# customize your systemd unit file for mariadb according to the# instructions in http://fedoraproject.org/wiki/Systemd[mysqld_safe]log-error=/var/log/mariadb/mariadb.logpid-file=/var/run/mariadb/mariadb.pid## include all files from the config directory#!includedir /etc/my.cnf.d
文件
数据
数据库
参数
配置
漫长
信息
场景
情况
拷贝
方式
日志
版本
状态
用户
级别
服务
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
未来革命有没有免费的服务器
优行网络技术苏州有限公司
网络安全硕士点排名
电子软件开发学校在哪里
华为服务器web管理界面
谷歌服务器什么时候上线
广播电视网络技术专业好不好
c4d数据库损坏browser
数据库一对多关系如何插入新数据
网络安全民法典调查目的
构建智慧校园软件开发
边境服务器满了怎么办
免费云服务服务器
hp服务器硬盘蓝灯
慈溪安卓软件开发设计
网络安全员叫什么
微信数据库 性别
绝地求生服务器怎么下载
南京软件开发工资
java软件开发书籍
中兴软件开发前景咋样
金视互联网科技
开鲁天气预报软件开发
不连接服务器怎么管理客户端
虚拟主机mysql数据库连接
数据库系统的安全对策分为几类
订单配送软件开发
软件开发应届生3800
手机软件开发破解版
永康门业软件开发