

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
How do I find out the 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)
- Related Questions & Answers
- Set the default character set in MySQL
- How do I set the default value for a column in MySQL?
- How to find out port of MySQL Server?
- How do I set the timezone of MySQL?
- Change MySQL default character set to UTF-8 in my.cnf?
- How do I see what character set a MySQL database / table / column is?
- How can we check the default character sets of all the MySQL databases we have on the server?
- How do I find out whether the underlying database supports batch processing?
- How do I find out the size of a canvas item in Tkinter?
- How can I start MySQL Server?
- How can I shutdown MySQL Server?
- How can I check the version of MySQL Server?
- How can I check the status of MySQL Server?
- How can I set a MySQL database to use MyISAM by default?
- How do I change the Tkinter default title in the OS bar?
Advertisements