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.
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_FRto the language
frenchand 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';
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 11.1.6, “Error Message Character Set”.
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.