当前位置:网站首页>mysql/mariadb怎样生成core文件
mysql/mariadb怎样生成core文件
2022-07-22 10:03:00 【雅冰石】
注意:打开core配置后会有如下两个风险
1、磁盘空间可能会满
----因为会将mysql server的所有内存信息导出到core文件中,包括buffer pool中的内容,可能会有几十上百G大小
2、mysql出现crash后启动速度会慢
----因为要导出大量的数据到core文件中,因此启动速度会慢很多。
#生成core文件步骤
1、打开linux的core文件配置
ulimit -c unlimited
2、修改配置文件,添加core_file配置(备注:配置在[mysqld]下面),并重启数据库
3、配置 suid_dumpable( mysql 通常会以 suid 方式启动)
echo 2 >/proc/sys/fs/suid_dumpable #改之前该参数值为0
4、设置core文件存放的目录并且设置完全控制权限
mkdir -p /data/core && chmod 777 /data/core && echo "/data/core/core" > /proc/sys/kernel/core_pattern #改之前/proc/sys/kernel/core_pattern值是core
#模拟mysql的crash场景
kill -SEGV 数据库进程号
#使用gdb查看core文件
cd /data/core
gdb mysqld core.8983
--本篇文章参考了mysql core文件的正确打开姿式 - JavaShuo
边栏推荐
- 7.19 binary tree
- mysql进阶(十七)Cannot Connect to Database Server问题分析
- Force deduction solution summary 731- my schedule II
- C # automatically generates a dictionary (when there is a lot of data)
- 【commons-beanutils专题】004- BeanUtils 专题
- Atr5179 single pole double throw switch chip replaces as179-92lf
- 多态性
- SQL Design Teaching Management Library
- 7.17 最低票价
- PHP Cookie
猜你喜欢
Atr5179 single pole double throw switch chip replaces as179-92lf
multiple inheritance
How many key precautions are there in the process of project implementation?
LeetCode刷题笔记
国产立体声音频数模D/A转换器DP4344替代兼容CS4344
Static member
记一次GCEasy的垃圾收集分析
Pytest interface automated testing framework | plug-in secondary development practice
项目执行过程中有几个关键注意事项?
CV520国产替代CI520非接触式读写器读卡芯片
随机推荐
The strongest screen tool sharex v14.0.1
【commons-beanutils专题】005- ConvertUtils 专题
Operator overloading
MySQL 查看表结构最后变更时间
DP4361国产六通道立体声D/A音频转换器芯片替代CS4361
国产立体声音频数模D/A转换器DP4344替代兼容CS4344
[take you to learn C, take you to fly] branch structure in Chapter 3 of C language programming (3rd Edition) of Zhejiang University Edition (exercise 3)
每日一题专栏前言
Force deduction solution summary 648 word replacement
PHP Cookie
运算符重载
ATR5179单刀双掷开关芯片替代AS179-92LF
mysql进阶(十七)Cannot Connect to Database Server问题分析
派生类的构造函数和析构函数
向量vector
派生类成员的访问
"Pilot Cup" is coming! Summon the strongest brain in scientific computing, 360000 prize pool waiting for you
Markdown数学公式语法
Vector
Force deduction solution summary 1260 two dimensional mesh migration