萬盛學電腦網

 萬盛學電腦網 >> 數據庫 >> mysql教程 >> 啟動mysql出錯:Cant find messagefile /usr/share/mysql/errmsg.sys

啟動mysql出錯:Cant find messagefile /usr/share/mysql/errmsg.sys

下面我們來看看關於啟動mysql出錯:Can't find messagefile '/usr/share/mysql/errmsg.sys出錯問題的解決辦法吧.


啟動數據庫出現錯誤,錯誤信息是:

[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
...

已成功啟動。

copyright © 萬盛學電腦網 all rights reserved