W3Schools Learner's Blog

w3Schools programming knowledge summary website

div

12/15/2017

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. [[email protected]_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. [[email protected]_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. [[email protected]_219_180_centos ~]# mysql -uroot -p
  3. //you could reset mysql server password, as follows.
  4. mysql> set password for [email protected] = password('123456');
thanks!

No comments:

Post a Comment

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