# comp_err - Compile MySQL Error Message File

MySQLMySQLi Database

The comp_err creates the errmsg.sys file which is used by mysqld to determine the error messages that need to be displayed for different error codes. After the current update to MySQL, the error information comes from the messages_to_error_log.txt and messages_to_clients.txt files in the share directory.

Before MySQL 8.0.19, the error information used to come from the errmsg-utf8.txt file in the sql/share directory. The comp_err also generates the mysqld_error.h, mysqld_ername.h, and mysqld_errmsg.h header files.

The comp_err can be invoked in the following way −

shell> comp_err [options]

It supports the below options −

--charset=dir_name, -C dir_name

It is the character set directory. The default is ../sql/share/charsets.

--debug=debug_options, -# debug_options

It writes a debugging log. A typical debug_options string looks like- d:t:O,file_name. The default is d:t:O,/tmp/comp_err.trace.

--debug-info, -T

It prints some debugging information when the program exits.

--errmsg-file=file_name, -H file_name

It is the name of the error message file. The default is mysqld_errmsg.h. This option was added in MySQL version 8.0.18.

It is the name of the error header file. The default is mysqld_error.h.

--in-file-errlog=file_name, -e file_name

It is the name of the input file that is used to define the error messages which are intended to be written to the error log. The default is ../share/messages_to_error_log.txt.

--name-file=file_name, -N file_name

It is the name of the error name file. The default is mysqld_ername.h.

--out-dir=dir_name, -D dir_name

It is the name of the output base directory. The default is ../sql/share/.

--out-file=file_name, -O file_name

It is the name of the output file. The default is errmsg.sys.

--version, -V

It displays the version information and exit.

Published on 10-Mar-2021 12:35:23