[跪求解决]百度服务器BCC下用yum安装的mysql5.7.20无操作运行数小时自动shutdown
service mysqld start 后, 服务过几个小时左右就自动shutdown了, 基本没有任何数据库操作, 就是开启了, 然后过几个小时后就shutdown了, 网站就用不了了, 请问怎么回事呢? 阿里云上同样的1G内存的ECS里并不会啊,也是mysql5.7.20 我平台还没上线还在开发中,1G内存够的吧...是否BCC需要什么配置来确保mysql5.7.20稳定运行?....
整个服务器就装了PHP7,mysql,vsftpd这几个简单的东西.
系统是:CentOS / 6.8 x86_64 (64bit) 1核1G
日志如下:
------------------------------------------------------------------------------------------------------
mysqld服务shutdown的日志:
2017-12-18T19:47:03.503012Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-12-18T19:47:03.543807Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2017-12-18T19:47:03.745187Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.20) starting as process 6777 ...
2017-12-18T19:47:04.595175Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-12-18T19:47:04.595234Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-12-18T19:47:04.595245Z 0 [Note] InnoDB: Uses event mutexes
2017-12-18T19:47:04.595253Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2017-12-18T19:47:04.595260Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-12-18T19:47:04.595267Z 0 [Note] InnoDB: Using Linux native AIO
2017-12-18T19:47:04.622159Z 0 [Note] InnoDB: Number of pools: 1
2017-12-18T19:47:04.743115Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-12-18T19:47:04.986152Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-12-18T19:47:05.029165Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2017-12-18T19:47:05.029221Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-12-18T19:47:05.029230Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-12-18T19:47:05.029239Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-12-18T19:47:05.029260Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-12-18T19:47:05.029267Z 0 [ERROR] Failed to initialize plugins.
2017-12-18T19:47:05.029271Z 0 [ERROR] Aborting
2017-12-18T19:47:05.055405Z 0 [Note] Binlog end
2017-12-18T19:47:05.124469Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
------------------------------------------------------------------------------------------------------
下面是我的my.conf: (基本就是默认my.conf,新增的我都注释掉了没用)
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
bind-address=0.0.0.0
disable-partition-engine-check=1
sql_mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
#performance_schema = OFF
#降低mysql内存占用
#performance_schema_max_table_instances=200
#table_definition_cache=200
#table_open_cache=128
#找出执行慢的sql语句
#log-slow-queries=queries-slow.log
performance_schema_instrument ='memory%=counted'
------------------------------------------------------------------------------------------------------
补一份mysqld服务启动的日志:(我刚启动的)
2017-12-19T01:44:06.774497Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-12-19T01:44:06.774569Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2017-12-19T01:44:06.776537Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.20) starting as process 8175 ...
2017-12-19T01:44:06.799576Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-12-19T01:44:06.799640Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-12-19T01:44:06.799650Z 0 [Note] InnoDB: Uses event mutexes
2017-12-19T01:44:06.799655Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2017-12-19T01:44:06.799659Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-12-19T01:44:06.799664Z 0 [Note] InnoDB: Using Linux native AIO
2017-12-19T01:44:06.799973Z 0 [Note] InnoDB: Number of pools: 1
2017-12-19T01:44:06.800128Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-12-19T01:44:06.801539Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-12-19T01:44:06.811766Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-12-19T01:44:06.814412Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-12-19T01:44:06.846145Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-12-19T01:44:06.861855Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 62483265
2017-12-19T01:44:06.861889Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 62483274
2017-12-19T01:44:06.861896Z 0 [Note] InnoDB: Database was not shutdown normally!
2017-12-19T01:44:06.861902Z 0 [Note] InnoDB: Starting crash recovery.
2017-12-19T01:44:07.156501Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2017-12-19T01:44:07.156528Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-12-19T01:44:07.156575Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-12-19T01:44:07.414153Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-12-19T01:44:07.415460Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-12-19T01:44:07.415476Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-12-19T01:44:07.415765Z 0 [Note] InnoDB: Waiting for purge to start
2017-12-19T01:44:07.465984Z 0 [Note] InnoDB: 5.7.20 started; log sequence number 62483274
2017-12-19T01:44:07.466568Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2017-12-19T01:44:07.468024Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-12-19T01:44:07.470354Z 0 [Note] InnoDB: Buffer pool(s) load completed at 171219 9:44:07
2017-12-19T01:44:07.488290Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2017-12-19T01:44:07.493973Z 0 [Warning] CA certificate ca.pem is self signed.
2017-12-19T01:44:07.496122Z 0 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
2017-12-19T01:44:07.496163Z 0 [Note] - '0.0.0.0' resolves to '0.0.0.0';
2017-12-19T01:44:07.496191Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2017-12-19T01:44:07.619414Z 0 [Note] Event Scheduler: Loaded 0 events
2017-12-19T01:44:07.619623Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.20' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
2017-12-19T01:44:08.098536Z 2 [Note] Access denied for user 'UNKNOWN_MYSQL_USER'@'localhost' (using password: NO)
求大神解决..莫名其妙,是否是linux的问题? CentOS / 6.8 x86_64 (64bit) 1核1G