By default, mysqld produces error messages in English, but they can be displayed instead 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. This applies to messages the server writes to the error log and sends to clients.
To select the language in which the server writes error messages, follow the instructions in this section. For information about changing the character set for error messages (rather than the language), see Section 10.1.6, “Error Message Character Set”. For general information about configuring error logging, see Section 5.4.2, “The Error Log”.
The server searches for the error message file using these rules:
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
By default, the language files are located in the
share/mysql/directory under the MySQL base directory.
variable can be set only at server startup and has only a global
read-only value at runtime.
lc_messages can be set at server
startup and has global and session values that can be modified at
runtime. Thus, 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';
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 error message content, remember to repeat your changes after each upgrade to a newer version of MySQL.