centos . mysql 启动失败

9 篇文章 0 订阅

今天遇到一个问题,一个项目的mysql突然不可用,navicat客户端提示是引擎问题,实际查看mysql日志,如下:

170705 11:09:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170705 11:09:37 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
170705 11:09:37  InnoDB: Initializing buffer pool, size = 8.0M
170705 11:09:37  InnoDB: Completed initialization of buffer pool
170705 11:09:38  InnoDB: Started; log sequence number 9 771674861
03:09:38 UTC - mysqld got signal 11 ;
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=16777216
read_buffer_size=262144
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 133925 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.


Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x40000
/usr/libexec/mysqld(my_print_stacktrace+0x29) [0x850ca9]
/usr/libexec/mysqld(handle_fatal_signal+0x483) [0x6a4143]
/lib64/libpthread.so.0() [0x3eac40f710]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
170705 11:09:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended


通过df查看,发现

[root@wxserver public]# df

Filesystem                      1K-blocks     Used Available Use% Mounted on

/dev/mapper/vg_wxserver-lv_root  51606140 48940328     44372 100% /

tmpfs                            66066592        0  66066592   0% /dev/shm

/dev/sda2                          495844    39623    430621   9% /boot

/dev/sda1                          204580      260    204320   1% /boot/efi

/dev/mapper/vg_wxserver-lv_home 518363432   231948 491800144   1% /home


本来以为不是这个原因,(root100%),是在找不到原因,就做了如下操作:

1.将程序的部分资源转移到home目录下,df查看root多出部分空间

2.mysql此时可以启动

3.启动后清理bin-log:

purge master logs before '2017-07-01 00:00:00';

清理后df

[root@wxserver public]# df

Filesystem                      1K-blocks     Used Available Use% Mounted on

/dev/mapper/vg_wxserver-lv_root  51606140 18594060  30390640  38% /

tmpfs                            66066592        0  66066592   0% /dev/shm

/dev/sda2                          495844    39623    430621   9% /boot

/dev/sda1                          204580      260    204320   1% /boot/efi

/dev/mapper/vg_wxserver-lv_home 518363432   231948 491800144   1% /home


4.此时mysql可随意启动,将程序数据转回原路径

思考:mysql使用root空间存储数据,my.cnf未指定用户组和用户




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值