Install MySQL5.6 on Centos6.5

Source: Internet
Author: User

Install MySQL5.6 on Centos6.5

Centos6.5 install MySQL5.6 or MySQL5.7 or uninstall MySQL

1. Install MySQL5.6

rpm -qa | grep mysqlmysql-utilities-1.3.6-1.el6.noarchmysql-server-5.1.71-1.el6.x86_64mysql-libs-5.1.71-1.el6.x86_64mysql-5.1.71-1.el6.x86_64mysql-connector-python-1.1.4-1.el6.noarchmysql-devel-5.1.71-1.el6.x86_64
yum remove mysql*
yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
yum install mysql mysql-devel mysql-server mysql-utilities

2. Install MySQL5.7

1) check whether the system has installed MySQLyum list installed | grep mysql
2). remove the built-in MySQL and its dependent command: yum-y remove mysql-libs.x86_64
3 ). add an rpm source to CentOS and select a newer source command wget started localinstall mysql-community-release-el6-5.noarch.rpmyum repolist all | grep mysqlyum-config-manager -- disable mysql55-communityyum-config-manager -- disable mysql56-communityyum-config-manager -- enable mysql57-community-dmryum repolist enabled | grep mysql
4) install the MySql server command yum install mysql-community-server
5) start MySQL Command service mysqld start
6) Check whether MySQL is self-started, and set to enable the self-startup command chkconfig -- list | grep mysqldchkconfig mysqld on
7). MySQL security setting command mysql_secure_installation

The default configuration file of mysql is usually in these files [/etc/my. cnf/etc/mysql/my. cnf/usr/etc/my. cnf ~ /. My. cnf]

ERROR 1819 (HY000): Your password does NOT satisfy the CURRENT policy requirements. Because the password Strength Verification plug-in validate_password is added to MySQL5.6.6, the relevant parameter settings are strict, so ...... Run the following command to modify the configuration file and then restart the service.

# Plugin env plugin-load = validate_password.so validate-password = OFF # ON/OFF /...

Use password-free login to the mysql command line window

8).[root@iZ250x18mnzZ myweb]# mysqld_safe --skip-grant-tables &[1] 26390[root@iZ250x18mnzZ myweb]# 2016-03-09T13:52:36.487526Z mysqld_safe Logging to '/var/log/mysqld.log'.2016-03-09T13:52:36.519635Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql[root@iZ250x18mnzZ myweb]# [root@iZ250x18mnzZ myweb]# mysqlWelcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 2Server version: 5.7.11 MySQL Community Server (GPL)Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> 

Change Password after Logon

mysql> update mysql.user set authentication_string=PASSWORD('password') where user='root' and host='localhost';Query OK, 1 row affected, 1 warning (0.05 sec)Rows matched: 1  Changed: 1  Warnings: 1mysql> flush privileges;Query OK, 0 rows affected (0.03 sec)

3. Centos6.5 fully uninstall MySQL

Yum remove mysql * yum list installed | grep mysqlyum-y remove mysql-libs.x86_64yum remove mysql-server mysql-libs mysql-serverfind/-name mysql will delete the related items found by rpm-qa | grep mysql (the queried Dongdong yum is removed) rm-rf mysql

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.