
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Find Default Server Character Set in MySQL
You can use system variables character_set_server to know the default server character set in MySQL. Following is the syntax −
SHOW VARIABLES LIKE 'character_set_server';
Additionally, to u can use collation_server system variable to know the default collation in MySQL. Following is the syntax −
SHOW VARIABLES LIKE 'collation_server';
Let us execute the above syntaxes to know the default character set and collation.
Following is the query −
mysql> SHOW VARIABLES LIKE 'character_set_server';
This will produce the following output −
+----------------------+-------+ | Variable_name | Value | +----------------------+-------+ | character_set_server | utf8 | +----------------------+-------+ 1 row in set (0.25 sec)
Following is the query to know collation −
mysql> SHOW VARIABLES LIKE 'collation_server';
This will produce the following output −
+------------------+-----------------+ | Variable_name | Value | +------------------+-----------------+ | collation_server | utf8_unicode_ci | +------------------+-----------------+ 1 row in set (0.01 sec)
Advertisements