CentOS 7 mysql 5.6 installation

Update Os
yum -y install wget
 
yum -y update

reboot

1. Install the MySQL Community repository
wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
rpm -Uvh mysql-community-release-el6-5.noarch.rpm

2. Installing MySQL 5.6
yum -y install mysql mysql-server
3. verify the correct packages were installed:
 
rpm -qa | grep mysql

Now you can start MySQL 5.6 using the following command:
chkconfig mysqld on
service mysqld start
Secure installation
sudo mysql_secure_installation

Verify that MySQL 5.6 is running:
mysql -v
 Start and stop MySQL
Use the following command to start MySQL:
sudo /sbin/service mysqld start
Use the following command to stop MySQL:
sudo /sbin/service mysqld stop
Edit config file
sudo gedit /etc/my.cnf
Grant all privileges
GRANT ALL ON *.* to root@'%' IDENTIFIED BY 'PWD';
Allow firewall
firewall-cmd --permanent --add-port=3306/tcp
firewall-cmd --reload

Post a Comment

0 Comments