mysql 有報錯  ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

來源:互聯網
上載者:User

標籤:engine   lin   release   warning   mysqld   fail   tar   init   plugin   

 

sh-4.1# /etc/init.d/mysqld status ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) existssh-4.1# /etc/init.d/mysqld startStarting MySQL. ERROR! The server quit without updating PID file (/data1/mysql/mysql.pid).
sh-4.1# rm mysql sh-4.1# /etc/init.d/mysqld status ERROR! MySQL is not runningsh-4.1# /etc/init.d/mysqld startStarting MySQL. ERROR! The server quit without updating PID file (/data1/mysql/mysql.pid).

看了一下mysql的日誌有如下錯誤:

170104  9:44:06 [Note] /apps/mysql-5.5.38/bin/mysqld: Shutdown complete170104 09:44:06 mysqld_safe mysqld from pid file /data1/mysql/mysql.pid ended170104 09:46:12 mysqld_safe Starting mysqld daemon with databases from /data1/mysql/170104  9:46:12 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.170104  9:46:12 [Note] Plugin ‘FEDERATED‘ is disabled.170104  9:46:12 InnoDB: The InnoDB memory heap is disabled170104  9:46:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins170104  9:46:12 InnoDB: Compressed tables use zlib 1.2.3170104  9:46:12 InnoDB: Using Linux native AIO170104  9:46:12 InnoDB: Initializing buffer pool, size = 2.0GInnoDB: mmap(2197815296 bytes) failed; errno 12170104  9:46:12 InnoDB: Completed initialization of buffer pool170104  9:46:12 InnoDB: Fatal error: cannot allocate memory for the buffer pool170104  9:46:12 [ERROR] Plugin ‘InnoDB‘ init function returned error.170104  9:46:12 [ERROR] Plugin ‘InnoDB‘ registration as a STORAGE ENGINE failed.170104  9:46:12 [ERROR] Unknown/unsupported storage engine: InnoDB170104  9:46:12 [ERROR] Aborting170104  9:46:12 [Note] /apps/mysql-5.5.38/bin/mysqld: Shutdown complete170104 09:46:12 mysqld_safe mysqld from pid file /data1/mysql/mysql.pid ended

從err日誌,可以看出,我分配的Initializing buffer pool, size = 2.0G,使得機器無法初始化。導致mysql啟動不起來。

這個值=>my.cnf的innodb_buffer_pool_size

sh-4.1# grep "innodb-buffer-pool-size" /etc/my.cnf innodb-buffer-pool-size        = 1G#innodb-buffer-pool-size        = 2G

問題解決啟動成功!!!!

mysql 有報錯  ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.