By default, mysqld produces error messages in English, but they can also be displayed in any of several other languages: Czech, Danish, Dutch, Estonian, French, German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Norwegian-ny, Polish, Portuguese, Romanian, Russian, Slovak, Spanish, or Swedish.
You can select which language the server uses for error messages using the instructions in this section.
As of MySQL 5.5, the server searches for the error message file in two locations:
It tries to find the file in a directory constructed from two
system variable values,
lc_messages, with the latter
converted to a language name. Suppose that you start the
server using this command:
mysqld --lc_messages_dir=/usr/share/mysql --lc_messages=fr_FR
In this case, mysqld maps the locale
fr_FR to the language
french and looks for the error file in the
variable has only a global value and is read only.
lc_messages has global and
session values and can be modified at runtime, so the error
message language can be changed while the server is running, and
individual clients each can have a different error message
language by changing their session
lc_messages value to a different
locale name. For example, if the server is using the
fr_FR locale for error messages, a client can
execute this statement to receive error messages in English:
SET lc_messages = 'en_US';
Before MySQL 5.5, the
lc_messages system variables were
unavailable. To start mysqld with a particular
language for error messages, the
option were used. The option value can be a language name or the
full path to the error message file. For example:
Specify the language name in lowercase.
By default, the language files are located in the
directory under the MySQL base directory.
For information about changing the character set for error messages (rather than the language), see Section 10.1.6, “Character Set for Error Messages”.
You can change the content of the error messages produced by the server using the instructions in the MySQL Internals manual, available at MySQL Internals: Error Messages. If you do change the content of error messages, remember to repeat your changes after each upgrade to a newer version of MySQL.