W3Schools Learner's Blog

W3Schools Programming knowledge summary website



how to install mysql 5.6| yum install mysql 5.6

How to Install MySQL 5.6 on CentOS 7 by using yum command? yum install MySQL 5.6 server ,follow the given below steps.
step1: download the yum repository rpm package.
  1. yum install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
step2: Check the MySQL 5.6 RPM package is available,using yum repolist enabled command. as follows:
  1. [root@VM_230_32_centos ~]# sudo yum repolist enabled | grep "mysql.*-community.*"
  2. Repository epel is listed more than once in the configuration
  3. mysql-connectors-community/x86_64 MySQL Connectors Community                  42
  4. mysql-tools-community/x86_64      MySQL Tools Community                       53
  5. mysql56-community/x86_64          MySQL 5.6 Community Server                 361
step3: Now, you can type in the following commands to install MySQL 5.6.
  1. yum install mysql-community-server
output: it's success!
  1. .......
  2. Replaced:
  3.   mariadb-libs.x86_64 1:5.5.52-1.el7                                                                                                                                                                                           
  4. Complete!
  5. [root@VM_230_32_centos ~]#
step4: Start MySQL 5.6 using the following command:
  1. //on centos 7.x
  2. systemctl start mysqld
  3. systemctl restart mysqld
  4. systemctl stop mysqld

  5. //on centos 6.x
  6. service mysqld start
  7. service mysqld restart
  8. service mysqld stop
step5: Login into mysql server. Because it is freshly installed hence root password is blank(MySQL 5.7 server initial password is not empty)
  1. //login
  2. [root@VM_219_180_centos ~]# mysql -uroot -p
  3. //you could reset mysql server password, as follows.
  4. mysql> set password for root@localhost = password('123456');

No comments:

Post a Comment

Note: only a member of this blog may post a comment.