O'Reilly logo

MySQL in a Nutshell by Russell J.T. Dyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

comp_err

Synopsis

comp_err source destination

Use this to compile text files that contain mappings of error codes into a format necessary for MySQL. This is particularly useful for creating error code messages in spoken languages for which error message files do not already exist. You can also use it to modify error messages to a particular liking. To do this, just edit the appropriate errmsg.txt file in its default directory. For English messages on Unix systems, the source text file and the compiled system file are found typically in /usr/share/mysql/english. The following demonstrates how to compile a text file containing error messages in Pig Latin:

comp_err /usr/share/mysql/piglatin/errmsg.txt \
         /usr/share/mysql/piglatin/errmsg.sys

To make the new set of error messages the default set, add the following line to the MySQL configuration file (e.g., /etc/my.cnf) under the [mysqld] section:

language=/usr/share/mysql/piglatin

Notice that only the path is given and not the filename.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required