First, check whether the system installs other versions of MySQL data
#yum List Installed | grep mysql#yum-y Remove mysql-libs.x86_64
Second, installation and configuration
# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm# RPM-IVH mysql-community-release-el6-5.noarch.rpm# Yum Repolist All | grep MySQL
Installing the MySQL Database
# yum Install mysql-community-server-y
Set to On boot (2, 3, 4 are on for start-up automatically)
# chkconfig--list | grep mysqld# chkconfig mysqld on
Third, set the remote root
Start MySQL
# service Mysqld Start
Set Root password
# mysql_secure_installation
Login to root account
Establish a remote root user
Mysql> GRANT All privileges on * * to ' root ' @ '% ' identified by ' you set the password ' with GRANT option;mysql> flush privileges;
Iv. Setting UTF-8 encoding
View MySQL Original code:
Mysql> Show variables like ' character% ';
Set encoding
# VI/ETC/MY.CNF
The following (less fill):
[Mysqld]character-set-server=utf8 collation-server=utf8_general_ci [mysql]default-character-set = utf8[ Mysql.server]default-character-set = Utf8[mysqld_safe]default-character-set = Utf8[client]default-character-set = Utf8
Restart MySQL
# Service Mysqld Restart
Review the encoding again:
# mysql-uroot-pmysql> Show variables like ' character% '; +--------------------------+----------------------------+ | variable_name | Value |+--------------------------+----------------------------+| character_set_client | UTF8 | | character_set_connection | UTF8 | | Character_set_database | UTF8 | | Character_set_filesystem | binary | | Character_set_results | UTF8 | | Character_set_server | UTF8 | | Character_set_system | UTF8 | | Character_sets_dir | /usr/share/mysql/charsets/|+--------------------------+----------------------------+8 rows in Set (0.00 sec)
centos6.8 yum install MySQL 5.6 (complete)