
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
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 Articles
- 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 see what character set a MySQL database / table / column is?
- Change MySQL default character set to UTF-8 in my.cnf?
- How can we check the default character sets of all the MySQL databases we have on the server?
- How do I set the timezone of MySQL?
- How can I set a MySQL database to use MyISAM by default?
- How can I start MySQL Server?
- How can I shutdown MySQL Server?
- How to set default Field Value in MySQL?
- How to set MySQL default value NONE?
- How can I check the version of MySQL Server?
- How can I check the status of MySQL Server?
- How do I find out the size of a canvas item in Tkinter?

Advertisements