当前位置:网站首页>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
边栏推荐
- NPM Internal Split module
- 快速熟知XML解析
- ROS 问题(topic types do not match、topic datatype/md5sum not match、msg xxx have changed. rerun cmake)
- MATLAB R2021b 安装libsvm
- Write a pure handwritten QT Hello World
- 2021 Shanghai safety officer C certificate examination registration and analysis of Shanghai safety officer C certificate search
- COMSOL----微阻梁模型的搭建---最终的温度分布和变形情况----几何模型的建立
- 如果时间是条河
- Matlab method is good~
- 图解网络:揭开TCP四次挥手背后的原理,结合男女朋友分手的例子,通俗易懂
猜你喜欢

Probability distribution

从Starfish OS持续对SFO的通缩消耗,长远看SFO的价值

break net

About snake equation (3)

快速熟知XML解析

滑环在直驱电机转子的应用领域

Sum of submatrix

QT build with built-in application framework -- Hello World -- use min GW 32bit

5. Contrôle discret et contrôle continu

ANSI / nema- mw- 1000-2020 magnetic iron wire standard Latest original
随机推荐
【目标跟踪】|DiMP: Learning Discriminative Model Prediction for Tracking
The foreach map in JS cannot jump out of the loop problem and whether foreach will modify the original array
【目标跟踪】|atom
2022 low voltage electrician examination content and low voltage electrician simulation examination question bank
写一个纯手写的qt的hello world
用户之声 | 对于GBase 8a数据库学习的感悟
Urban land use distribution data / urban functional zoning distribution data / urban POI points of interest / vegetation type distribution
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
2022 safety officer-c certificate examination summary and safety officer-c certificate reexamination examination
Codeforces Round #649 (Div. 2)——A. XXXXX
The persistence mode of redis - RDB and AOF persistence mechanisms
2022 free test questions of fusion welding and thermal cutting and summary of fusion welding and thermal cutting examination
GBASE观察 | 数据泄露频发 信息系统安全应如何守护
Usage of xcolor color in latex
Common operations of numpy on two-dimensional array
NPM internal split module
【SolidWorks】修改工程图格式
Codeforces Round #643 (Div. 2)——B. Young Explorers
Is it safe to open an account on your mobile phone for small amount of stock speculation?
Matlab code on error analysis (MAE, MAPE, RMSE)