[英]Can't start mysqld_safe on linux
我已經下載了mysql二進制文件,我正在嘗試按照此處的說明進行安裝。 當我嘗試運行bin/mysqld_safe --user=mysql &
command時,我得到以下輸出:
40211 19:04:56 mysqld_safe登錄到'/usr/local/mysql/data/irpowerweb.err'。
140211 19:04:56 mysqld_safe使用/ usr / local / mysql / data中的數據庫啟動mysqld守護程序
140211 19:04:57來自pid文件的mysqld_safe mysqld /usr/local/mysql/data/irpowerweb.pid已結束
錯誤日志的內容是:
140211 19:07:01 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
2014-02-11 19:07:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-02-11 19:07:02 19511 [Note] Plugin 'FEDERATED' is disabled.
2014-02-11 19:07:02 19511 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2014-02-11 19:07:02 19511 [Note] InnoDB: The InnoDB memory heap is disabled
2014-02-11 19:07:02 19511 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2014-02-11 19:07:02 19511 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-02-11 19:07:02 19511 [Note] InnoDB: Using Linux native AIO
2014-02-11 19:07:02 19511 [Note] InnoDB: Not using CPU crc32 instructions
2014-02-11 19:07:02 19511 [Note] InnoDB: Initializing buffer pool, size = 64.0M
InnoDB: mmap(68370432 bytes) failed; errno 12
2014-02-11 19:07:02 19511 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2014-02-11 19:07:02 19511 [ERROR] Plugin 'InnoDB' init function returned error.
2014-02-11 19:07:02 19511 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-02-11 19:07:02 19511 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-02-11 19:07:02 19511 [ERROR] Aborting
2014-02-11 19:07:02 19511 [Note] Binlog end
...
Shutting down stuff
...
2014-02-11 19:07:02 19511 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
140211 19:07:02 mysqld_safe mysqld from pid file /usr/local/mysql/data/irpowerweb.pid ended
這是my.cnf
:
[mysqld]
innodb_buffer_pool_size = 64M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
我只想讓mysql以w / e方式運行。 我嘗試使用yum install mysql-server
軟件包,下載rpm軟件包並且無法啟動它。 我選擇了簡單的tar包並開始關注上面的鏈接,但后來我又沒能開始。
由於錯誤狀態Cannot allocate memory for the buffer pool
我嘗試將內存減少到64m(默認為128m)並且它不起作用。 我是一個新手,我已經做了很多搜索,並沒有弄清楚如何解決這個問題。
PS如果它有幫助,我使用ssh連接到內存不足的服務器(512MB內存,沒有交換),我認為這是一個紅帽Linux。
您最重要的錯誤是:
無法為緩沖池分配內存
你必須在my.cnf
降低它。
當你free
運行時, mysqld_safe
已經完成清理,所以你必須通過另一個終端來監控內存。 但是默認的my.cnf
會耗盡你的可用內存是很正常的。 這是Debian沒有附帶默認my.cnf配置的原因之一。
更新 :以防萬一,請確保:
ulimit -s
確保你的堆棧大小足夠大(你可以增加它: ulimit -s <new_size>
甚至ulimit -s unlimited
) 嘗試添加:
[mysqld]
...
skip-bdb
skip-innodb
這將阻止Berkley DB和InnoDB的啟動。
我在這里找到了答案。 使用以下my.cnf並且它有效:
[mysqld]
innodb=OFF
ignore-builtin-innodb
skip-innodb
default-storage-engine=myisam
default-tmp-storage-engine=myisam
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.