啟動mysql出錯:Can't find messagefile '/usr/share/mysql/errmsg.sys

來源:互聯網
上載者:User


啟動資料庫出現錯誤,錯誤資訊是:

[ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
root@debian:/usr/local# /etc/init.d/mysql3306 start
 
Starting MySQL
...The server quit without updating PID file (/home/www/mysql/m3306/mysql3306.pid). ... failed!
root@debian:/usr/local/mysql3306# cat /home/www/mysql/m3306/mysql3306.err
120102 14:11:58 mysqld_safe Starting mysqld daemon with databases from /home/www/mysql/m3306
120102 14:11:58 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
120102 14:11:58 [Note] Plugin 'FEDERATED' is disabled.
120102 14:11:58 InnoDB: The InnoDB memory heap is disabled
120102 14:11:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120102 14:11:58 InnoDB: Compressed tables use zlib 1.2.3
120102 14:11:58 InnoDB: Using Linux native AIO
120102 14:11:58 InnoDB: Initializing buffer pool, size = 128.0M
120102 14:11:58 InnoDB: Completed initialization of buffer pool
120102 14:11:58 InnoDB: highest supported file format is Barracuda.
120102 14:11:58  InnoDB: Waiting for the background threads to start
120102 14:11:59 InnoDB: 1.1.8 started; log sequence number 1595675
120102 14:11:59 [ERROR] Aborting
 
120102 14:11:59  InnoDB: Starting shutdown...
120102 14:12:00  InnoDB: Shutdown completed; log sequence number 1595675
120102 14:12:00 [Note]
120102 14:12:00 mysqld_safe mysqld from pid file /home/www/mysql/m3306/mysql3306.pid ended

解決方案是:

root@debian:/usr/local# vi mysql3306/my.cnf

加入language配置項,由於我是使用二進位分發包進行安裝的,而預設的情況下,mysql會到/usr/local/mysql/share/english下尋找該檔案,

但由於我的mysql安裝路徑 為/usr/local/mysql3306/,所以如下:
 
[mysqld]
pid-file        = /home/www/mysql/m3306/mysql3306.pid
log-error       = /home/www/mysql/m3306/mysql3306.err
language        = /usr/local/mysql3306/share/english            #此處為language配置項
 
port            = 3306
socket          = /tmp/mysql3306.sock
basedir         = /usr/local/mysql3306
datadir         = /home/www/mysql/m3306

重新啟動:

root@debian:/usr/local# /etc/init.d/mysql3306 start
Starting MySQL
...

已成功啟動。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.