แรม 1 GB ครับ
ลองเปลี่ยนเป็นแบบนี้แล้วคับ
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
max_connections=1000000
max_user_connections=30
wait_timeout=30
interactive_timeout=50
long_query_time=5
#log-queries-not-using-indexes
#log-slow-queries=/var/log/mysql/log-slow-queries.log
#innodb_use_native_aio = 0
innodb_file_per_table
[mysqld_safe]
log-error=/var/log/mysqld.log
logs
141229 11:47:17 mysqld_safe Number of processes running now: 0
141229 11:47:17 mysqld_safe mysqld restarted
141229 11:47:19 [Warning] option 'max_connections': unsigned value 20000000 adjusted to 100000
141229 11:47:22 [Note] Plugin 'FEDERATED' is disabled.
141229 11:47:23 InnoDB: The InnoDB memory heap is disabled
141229 11:47:23 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141229 11:47:23 InnoDB: Compressed tables use zlib 1.2.3
141229 11:47:23 InnoDB: Using Linux native AIO
141229 11:47:23 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
141229 11:47:23 InnoDB: Completed initialization of buffer pool
141229 11:47:23 InnoDB: Fatal error: cannot allocate memory for the buffer pool
141229 11:47:23 [ERROR] Plugin 'InnoDB' init function returned error.
141229 11:47:23 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141229 11:47:23 [ERROR] Unknown/unsupported storage engine: InnoDB
141229 11:47:23 [ERROR] Aborting
141229 11:47:23 [Note] /usr/libexec/mysqld: Shutdown complete
141229 11:47:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141229 11:50:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141229 11:50:48 [Warning] option 'max_connections': unsigned value 20000000 adjusted to 100000
141229 11:50:48 [Note] Plugin 'FEDERATED' is disabled.
141229 11:50:48 InnoDB: The InnoDB memory heap is disabled
141229 11:50:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141229 11:50:48 InnoDB: Compressed tables use zlib 1.2.3
141229 11:50:48 InnoDB: Using Linux native AIO
141229 11:50:48 InnoDB: Initializing buffer pool, size = 128.0M
141229 11:50:48 InnoDB: Completed initialization of buffer pool
141229 11:50:48 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
141229 11:50:48 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
141229 11:50:48 InnoDB: Waiting for the background threads to start
141229 11:50:49 InnoDB: 5.5.41 started; log sequence number 1856298
141229 11:50:49 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141229 11:50:49 [Note] - '0.0.0.0' resolves to '0.0.0.0';
141229 11:50:49 [Note] Server socket created on IP: '0.0.0.0'.
141229 11:50:49 [Note] Event Scheduler: Loaded 0 events
141229 11:50:49 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.41' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi
141229 12:04:07 [Note] /usr/libexec/mysqld: Normal shutdown
141229 12:04:07 [Note] Event Scheduler: Purging the queue. 0 events
141229 12:04:09 InnoDB: Starting shutdown...
141229 12:04:10 InnoDB: Shutdown completed; log sequence number 1856298
141229 12:04:10 [Note] /usr/libexec/mysqld: Shutdown complete
141229 12:04:10 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141229 12:04:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141229 12:04:11 [Warning] option 'max_connections': unsigned value 20000000 adjusted to 100000
141229 12:04:11 [Note] Plugin 'FEDERATED' is disabled.
141229 12:04:11 InnoDB: The InnoDB memory heap is disabled
141229 12:04:11 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141229 12:04:11 InnoDB: Compressed tables use zlib 1.2.3
141229 12:04:11 InnoDB: Using Linux native AIO
141229 12:04:11 InnoDB: Initializing buffer pool, size = 128.0M
141229 12:04:11 InnoDB: Completed initialization of buffer pool
141229 12:04:11 InnoDB: highest supported file format is Barracuda.
141229 12:04:11 InnoDB: Waiting for the background threads to start
141229 12:04:12 InnoDB: 5.5.41 started; log sequence number 1856298
141229 12:04:12 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141229 12:04:12 [Note] - '0.0.0.0' resolves to '0.0.0.0';
141229 12:04:12 [Note] Server socket created on IP: '0.0.0.0'.
141229 12:04:12 [Note] Event Scheduler: Loaded 0 events
141229 12:04:12 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.41' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi
141229 12:08:02 mysqld_safe Number of processes running now: 0
141229 12:08:02 mysqld_safe mysqld restarted
141229 12:08:09 [Warning] option 'max_connections': unsigned value 20000000 adjusted to 100000
141229 12:08:13 [Note] Plugin 'FEDERATED' is disabled.
141229 12:08:13 InnoDB: The InnoDB memory heap is disabled
141229 12:08:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141229 12:08:13 InnoDB: Compressed tables use zlib 1.2.3
141229 12:08:13 InnoDB: Using Linux native AIO
141229 12:08:13 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
141229 12:08:13 InnoDB: Completed initialization of buffer pool
141229 12:08:13 InnoDB: Fatal error: cannot allocate memory for the buffer pool
141229 12:08:13 [ERROR] Plugin 'InnoDB' init function returned error.
141229 12:08:13 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141229 12:08:14 [ERROR] Unknown/unsupported storage engine: InnoDB
141229 12:08:14 [ERROR] Aborting
141229 12:08:14 [Note] /usr/libexec/mysqld: Shutdown complete
141229 12:08:14 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141229 12:15:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141229 12:15:38 [Warning] option 'max_connections': unsigned value 20000000 adjusted to 100000
141229 12:15:38 [Note] Plugin 'FEDERATED' is disabled.
141229 12:15:38 InnoDB: The InnoDB memory heap is disabled
141229 12:15:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141229 12:15:38 InnoDB: Compressed tables use zlib 1.2.3
141229 12:15:38 InnoDB: Using Linux native AIO
141229 12:15:38 InnoDB: Initializing buffer pool, size = 128.0M
141229 12:15:38 InnoDB: Completed initialization of buffer pool
141229 12:15:38 InnoDB: highest supported file format is Barracuda.
141229 12:15:38 InnoDB: Waiting for the background threads to start
141229 12:15:39 InnoDB: 5.5.41 started; log sequence number 1856298
141229 12:15:39 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141229 12:15:39 [Note] - '0.0.0.0' resolves to '0.0.0.0';
141229 12:15:39 [Note] Server socket created on IP: '0.0.0.0'.
141229 12:15:39 [Note] Event Scheduler: Loaded 0 events
141229 12:15:39 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.41' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi
141229 12:16:50 [Note] /usr/libexec/mysqld: Normal shutdown
141229 12:16:50 [Note] Event Scheduler: Purging the queue. 0 events
141229 12:16:50 InnoDB: Starting shutdown...
141229 12:16:51 InnoDB: Shutdown completed; log sequence number 1856298
141229 12:16:51 [Note] /usr/libexec/mysqld: Shutdown complete
141229 12:16:51 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141229 12:17:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141229 12:17:09 [Warning] option 'max_connections': unsigned value 20000000 adjusted to 100000
141229 12:17:10 [Note] Plugin 'FEDERATED' is disabled.
141229 12:17:10 InnoDB: The InnoDB memory heap is disabled
141229 12:17:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141229 12:17:10 InnoDB: Compressed tables use zlib 1.2.3
141229 12:17:10 InnoDB: Using Linux native AIO
141229 12:17:10 InnoDB: Initializing buffer pool, size = 128.0M
141229 12:17:10 InnoDB: Completed initialization of buffer pool
141229 12:17:10 InnoDB: highest supported file format is Barracuda.
141229 12:17:10 InnoDB: Waiting for the background threads to start
141229 12:17:11 InnoDB: 5.5.41 started; log sequence number 1856298
141229 12:17:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141229 12:17:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
141229 12:17:11 [Note] Server socket created on IP: '0.0.0.0'.
141229 12:17:11 [Note] Event Scheduler: Loaded 0 events
141229 12:17:11 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.41' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi
141229 12:23:11 [Note] /usr/libexec/mysqld: Normal shutdown
141229 12:23:11 [Note] Event Scheduler: Purging the queue. 0 events
141229 12:23:13 InnoDB: Starting shutdown...
141229 12:23:14 InnoDB: Shutdown completed; log sequence number 1856298
141229 12:23:14 [Note] /usr/libexec/mysqld: Shutdown complete
141229 12:23:14 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141229 12:23:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141229 12:23:14 [Warning] option 'max_connections': unsigned value 1000000 adjusted to 100000
141229 12:23:14 [Note] Plugin 'FEDERATED' is disabled.
141229 12:23:14 InnoDB: The InnoDB memory heap is disabled
141229 12:23:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141229 12:23:14 InnoDB: Compressed tables use zlib 1.2.3
141229 12:23:14 InnoDB: Using Linux native AIO
141229 12:23:14 InnoDB: Initializing buffer pool, size = 128.0M
141229 12:23:14 InnoDB: Completed initialization of buffer pool
141229 12:23:14 InnoDB: highest supported file format is Barracuda.
141229 12:23:14 InnoDB: Waiting for the background threads to start
141229 12:23:15 InnoDB: 5.5.41 started; log sequence number 1856298
141229 12:23:15 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141229 12:23:15 [Note] - '0.0.0.0' resolves to '0.0.0.0';
141229 12:23:15 [Note] Server socket created on IP: '0.0.0.0'.
141229 12:23:15 [Note] Event Scheduler: Loaded 0 events
141229 12:23:15 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.41' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi
ใช้ไปสักพัก มันฟ้องแบบนี้อีกคับ Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
max_connections ควรปรับเท่าไรดีคับ
เดียวลองใส่ตามคุณ icez ดูอาการก่อนครับ