CentOS 6.3 32-bit Operating System
Default mysql5.6 configuration file
# For advice on how to change settings please see
# Http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** Do not edit this file. It's a template which will be copied to
# *** Default location during install, and will be replaced if you
# *** Upgrade to a newer version of MySQL.
[Mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# Cache in MySQL. Start at 70% of total RAM for dedicated servers, else 10%.
# Innodb_buffer_pool_size = 128 M
# Remove leading # to turn on a very important data integrity option: logging
# Changes to the binary log between backups.
# Log_bin
# These are commonly set, remove the # and set as required.
# Basedir = .....
# Datadir = .....
# Port = .....
# Server_id = .....
# Socket = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# Join_buffer_size = 128 M
# Sort_buffer_size = 2 M
# Read_rnd_buffer_size = 2 M
SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES
Use the default configuration file to start mysql5.6
Mysql> status;
--------------
Mysql Ver 14.14 Distrib 5.6.10, for Linux (i686) using EditLine wrapper
Connection id: 1
Current database:
Current user: root @ localhost
SSL: Not in use
Current pager: stdout
Using outfile :''
Using delimiter :;
Server version: 5.6.10 Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket:/tmp/mysql. sock
Uptime: 10 sec
Threads: 1 Questions: 5 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.500
--------------
We can see that "Server characterset" and "Db characterset" are "latin1" by default. To change the default Character Set, add it to the my. cnf configuration file.
Character-set-server = utf8
Then restart the mysql service.
Service mysql restart