comp_err
comp_err source destinationThis utility compiles text files that contain mappings of error codes into a format used by 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 your own wording. 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.sysTo make the new set of error messages the default set, add the
following line to the MySQL configuration file (e.g.,
my.cnf or my.ini, depending on
your system) under the [mysqld] section:
language=/usr/share/mysql/piglatin
Notice that only the directory is given and not the filename.
Here is a list of options available for this utility in alphabetical order:
--charset=path, -C
pathThis option specifies the path to the character set files.
The default directory is /usr/local/mysql/sql/share/charsets,
adjusted for the server’s installation location.
--debug[=options], -#
options]This option logs debugging information. The set of options
used by default is 'd:t:o,logname'. See Table 16-1 at the end of the list of
options under the mysqldump utility for an
explanation of these flags and others that may be used.
--debug-info, -TThis option writes debugging information and CPU and memory usage information to the log after the utility ends.
--header_file=filename, -H
filenameThis option specifies the error header file. By default, it’s mysqld_error.h.
--in_file=filename, -F
filenameThis option specifies the input file. By default, it’s
/usr/local/mysql/sql/share/errmsg.txt,
adjusted for the server’s installation location.
--name_file=filename, -N
filenameThis option specifies the error file. By default, it’s mysqld_ername.h.
--out_dir=path, -D
pathThis option specifies the output directory. By default, it’s
/usr/local/mysql/sql/share,
adjusted for the server’s installation location.
--out_file=filename, -O
filenameThis option specifies the output file. By default, it’s errmsg.sys.
--statefile=filename, -S
filenameThis option specifies the SQLSTATE header file to be generated. By default, it’s sql_state.h.
--version, -VThis option returns the version of the utility.