Steps to install latest version of mysql and php

Install MYSQL5.7 follow below steps :- To install Php Go to –>Php Installation

First Check the version of OS

cat /etc/redhat-release
CentOS release 6.9(Final)

Steps:-Download and add the following MySQL Yum repository
1)On RHEL/CentOS 6

wget http://dev.mysql.com/get/mysql157-community-release-e16-7.noarch.rpm

2)Install Packages

yum localinstall mysql57-community-release-e16-7.noarch.rpm

3)Verify Mysql yum enabled

yum repolist enabled | grep “mysql.*-community.*”

4)Installing latest mysql version

yum install mysql-community-server

5)Service start

service mysqld starting

6)Service status

service mysqld status
mysqld is running.....

7)Finally verify mysql version

mysql  --version
mysqld ver 5.7.18 for linux on x86_64

8)Securing Mysql installation
Note:mysql version 5.7 generates temporary password in /var/log/mysqld.log after installation
To see the password:

grep ‘temporary password’ /var/log/mysqld.log

Once know the password then run to set new sql password

 


mysql_secure_installation

 

 

 

 

 

9)Connecting to mysql server

mysql -u root -p

10)Updating Mysql with yum and successfully installed MySQL 5.7.9

yum update mysql-server

Install PHP7(latest version) by
Step1:-

yum install php70w

Step2:-

yum install php-mysqlnd"-to install PDO mysql extensions

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *