mysqld被自己杀死了

时间:2017-11-13 15:42:15

标签: mysql server centos

我不知道什么过程正在杀死它。我在CentOS没有经验。首先它没有开始使用

service mysqld start

显示错误

/usr/bin/mysqld_safe: line 183:  7618 Killed                  nohup /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock < /dev/null > /dev/null 2>&1
/usr/bin/mysqld_safe: line 183:  7675 Killed                  nohup /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock < /dev/null > /dev/null 2>&1 > /dev/null 2>&1

所以我读了一下运行以下命令

sudo service httpd restart

然后mysqld正常启动,但在10-15秒内它再次显示上述错误。我认为有些过程会强行杀死它。

这是mysqld.log

Version: '5.6.38'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
2017-11-14 12:02:07 1535 [Note] Plugin 'FEDERATED' is disabled.
2017-11-14 12:02:07 1535 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-11-14 12:02:07 1535 [Note] InnoDB: The InnoDB memory heap is disabled
2017-11-14 12:02:07 1535 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-11-14 12:02:07 1535 [Note] InnoDB: Memory barrier is not used
2017-11-14 12:02:07 1535 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-11-14 12:02:07 1535 [Note] InnoDB: Using Linux native AIO
2017-11-14 12:02:07 1535 [Note] InnoDB: Using CPU crc32 instructions
2017-11-14 12:02:07 1535 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-11-14 12:02:07 1535 [Note] InnoDB: Completed initialization of buffer pool

并命令free -m显示下面的输出,以防它有用。

             total       used       free     shared    buffers     cached
Mem:           512        280        231        128          0          7
-/+ buffers/cache:        272        239
Swap:          256        207         48

以下是我的my.cnf文件。

[mysqld]
bind_address = 0.0.0.0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql

thread_cache_size=4

join_buffer_size=4M
sort_buffer_size=4M
read_buffer_size=4M
read_rnd_buffer_size=6M

myisam_sort_buffer_size=64M

key_buffer_size=128M
tmp_table_size=128M
max_heap_table_size=128M
query_cache_size=256M

query_cache_type=1
default-storage-engine=myisam
#skip-innodb



[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

导致该错误和查杀mysqld的原因是什么?如何解决此问题?

1 个答案:

答案 0 :(得分:0)

最后,我发现问题出在物理主存储器上。

  

增加主内存可以解决我的问题。

相关问题