I came across a simple fix for an odd MySQL issue. We recently had a MySQL server that needed to be restored from backups. After reinstalling all the essentials and importing the data, the database engine wouldn’t start. The log file indicated the following error.
[ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 481 error messages,
but it should contain at least 641 error messages.
After some googling, I found that some of the official RPM packages for MySQL actually contain the incorrect errmsg.sys files. The recommended fix listed on several sites was to either recompile from scratch or, vaguely, to “replace it with the correct errmsg.sys file.” I decided to try the vague reference and make it more specific here.
- First, determine the version of MySQL installed. In our case it was 5.1.56
- Second, locate a zip file of the raw uncompiled tar.gz of that version. I used http://mysql.llarian.net/Downloads/MySQL-5.1/mysql-5.1.56.tar.gz
- Third, download and extract the file to a location of your choosing.
cd /usr/local/src
wget http://mysql.llarian.net/Downloads/MySQL-5.1/mysql-5.1.56.tar.gz
tar -zxf mysql-5.1.56.tar.gz - Fourth, backup the existing errsg.sys file.
mv /usr/share/mysql/english/errmsg.sys /usr/share/mysql/english/errmsg.sys.old - Fifth, copy the errmsg.sys file from the extrated source code to the live location.
cp /usr/local/src/mysql-5.1.56/sql/share/english/errmsg.sys /usr/share/mysql/english/errmsg.sys
After that’s done, MySQL should start normally unless it encounters other errors.
-Mark Kraus
Senior Systems Administrator

















