当前位置:网站首页>mysql/mariadb怎样生成core文件
mysql/mariadb怎样生成core文件
2022-07-08 00:12:00 【雅冰石】
1、打开linux的core文件配置
ulimit -c unlimited
2、修改配置文件,添加core_file配置(备注:配置在[mysqld]下面),并重启数据库
3、配置 suid_dumpable( mysql 通常会以 suid 方式启动)
echo 2 >/proc/sys/fs/suid_dumpable
4、设置core文件存放的目录并且设置完全控制权限
mkdir /data/core && chmod 777 /data/core && echo "/data/core/core" > /proc/sys/kernel/core_pattern
#模拟mysql的crash场景,执行如下命令
kill -SEGV 数据库进程号
注意:打开core配置后会有如下两个风险
1、磁盘空间可能会满
----因为会将mysql server的所有内存信息导出到core文件中,包括buffer pool中的内容,可能会有几十上百G大小
2、mysql出现crash后启动速度会慢
----因为要导出大量的数据到core文件中,因此启动速度会慢很多。
--本篇文章参考了mysql core文件的正确打开姿式 - JavaShuo
边栏推荐
- 2022 safety officer-b certificate examination question bank and safety officer-b certificate simulation test questions
- Leetcode exercise - Sword finger offer 36 Binary search tree and bidirectional linked list
- About snake equation (2)
- 如何制作企业招聘二维码?
- How does Matplotlib generate multiple pictures in turn & only save these pictures without displaying them in the compiler
- ANSI / NEMA- MW- 1000-2020 磁铁线标准。. 最新原版
- Kafka connect synchronizes Kafka data to MySQL
- 批次管控如何实现?MES系统给您答案
- ANSI / nema- mw- 1000-2020 magnetic iron wire standard Latest original
- How does Matplotlib and PIL image integrate and save multiple pictures into one picture
猜你喜欢
Capability contribution three solutions of gbase were selected into the "financial information innovation ecological laboratory - financial information innovation solutions (the first batch)"
Understanding of maximum likelihood estimation
用户之声 | 冬去春来,静待花开 ——浅谈GBase 8a学习感悟
2022 high voltage electrician examination skills and high voltage electrician reexamination examination
Redux usage
为什么更新了 DNS 记录不生效?
The difference between distribution function and probability density function of random variables
能力贡献 GBASE三大解决方案入选“金融信创生态实验室-金融信创解决方案(第一批)”
QT build with built-in application framework -- Hello World -- use min GW 32bit
Understanding of expectation, variance, covariance and correlation coefficient
随机推荐
Sword finger offer II 041 Average value of sliding window
Write a pure handwritten QT Hello World
powerbuilder 中使用线程的方法
Different methods for setting headers of different pages in word (the same for footer and page number)
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
项目经理有必要考NPDP吗?我告诉你答案
Gnuradio transmits video and displays it in real time using VLC
2022 high voltage electrician examination skills and high voltage electrician reexamination examination
ANSI / NEMA- MW- 1000-2020 磁铁线标准。. 最新原版
写一个纯手写的qt的hello world
How does Matplotlib generate multiple pictures in turn & only save these pictures without displaying them in the compiler
About snake equation (1)
Problems of font legend and time scale display of MATLAB drawing coordinate axis
AttributeError: ‘str‘ object has no attribute ‘strftime‘
npm 內部拆分模塊
Android 创建的sqlite3数据存放位置
Frequency probability and Bayesian probability
Understanding of maximum likelihood estimation
Optimization of ecological | Lake Warehouse Integration: gbase 8A MPP + xeos
什么样的MES系统才是好系统