Modify the MySQL 5.5 configuration file according to the MySQL 5.6 configuration file.

Source: Internet
Author: User
Tags change settings

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

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.