- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to change MySQL error message language?
You can use lc_messages to change MySQL error message language. The syntax is as follows −
SET lc_messages = 'yourLanguage';
To understand the concept, let us create a table with some error and check the error message language.
Here, we have set the local message to French. Let us first create a table −
mysql> create table errorMessagelanguage -> ( -> Error_MessageId int, -> Error_Message varchar(100), -> );
The error message is as follows −
ERROR 1064 (42000): Erreur de syntaxe près de ')' à la ligne 5
Now you can set the error message to be in English language. The query is as follows −
mysql> set lc_messages ='en_US'; Query OK, 0 rows affected (0.00 sec)
Now create a table with some error and check the error message language −
mysql> create table errorMessagelanguage -> ( -> Error_MessageId int, -> Error_Message varchar(100), -> );
Here is the output −
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 5
Advertisements