Upgrade MySQL support UTF8MB4 character set detailed steps

Source: Internet
Author: User

Original: http://lib.csdn.net/article/mysql/4607

First step: Full backup of all databases

[Email protected] mysql]# mysqldump-u root-p--all-database >/data/back_mysql/all-database-04-30.

Step two: After you stop the MySQL service, view the installed MySQL, and then remove it from the following

[Email protected] data]# Rpm-qa | Grep-i MySQL

[Email protected] data]# rpm-e--nodeps mysql-server-5.1.52-1.el6_0.1.x86_64

[Email protected] data]# rpm-e--nodeps mysql-5.1.52-1.el6_0.1.x86_64

[Email protected] data]# rpm-e--nodeps mysql-libs-5.1.52-1.el6_0.1.x86_64

Step three: Check whether the installation location of MySQL is still present, and then delete it, including the my.cnf file

[[email protected] mysql]# Find/-name MySQL

Main database directory/var/lib/mysql, configuration file directory/usr/share/mysql, related command directory/usr/bin, configuration file/etc/my.cnf

These default directories will generally be deleted along with the deletion of the database, remember to be sure to delete the my.cnf, the first time in/USR/SHARE/MY.CNF did not notice, to the pit dead!!

Fourth step: Install MySQL, I here is installed in rpm mode, download the corresponding package on the official website after unpacking only the following three packages

mysql-client-5.6.24-1.linux_glibc2.5.x86_64.rpm

mysql-devel-5.6.24-1.linux_glibc2.5.x86_64.rpm

mysql-server-5.6.24-1.linux_glibc2.5.x86_64.rpm

[Email protected] mysql]# rpm-ivh/data/software/mysql-server-5.6.24-1.linux_glibc2.5.x86_64.rpm

Install in turn

Fifth Step: Modify the configuration file, set up the database storage directory under/data/mysql

[Email protected] etc]# Vi/etc/rc.d/init.d/mysql

DataDir =/data/mysql

[Email protected] software]# VI/ETC/MY.CNF

This is my configuration file.

[Client]
Port = 3306
Socket =/data/mysql/mysql.sock
Default-character-set = Utf8mb4


[MySQL]
Default-character-set = Utf8mb4

Upgrade MySQL support UTF8MB4 character set detailed steps

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.