Dowonload
Latest MySQL 5.7.9 Package with PhpMyAdmin
On CentOS/RHEL 6
64-Bit
Download mysql repo and install
[root@mysql ~]# wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
[root@mysql ~]#rpm –ivh mysql57-community-release-el6-7.noarch.rpm
[root@mysql ~]#yum clean all
Install MySQL Latest
package
[root@mysql ~]# yum install
mysql-community-{server,client,common,libs-compat,libs}-* mysql-5.*
Start MySQL Service
[root@mysql ~]#service mysqld start
To grep temp MySQL root password
[root@mysql ~]# grep 'temporary password'
/var/log/mysqld.log
Configure MySQL server
[root@mysql ~]#mysql_secure_installation
Note: Put above mysql grep password 1st and if
you want to change with new Password than
password should be complex like “Redhat@12345”
Login in to MySQL
[root@mysql ~]#mysql -u root -p
mysql>create database kvit;
mysql> use kvit;
mysql>create table book(name varchar(20),book_id
varchar(20));
mysql>insert into book
values("Shahzad","sa1");
Install
apache package
[root@mysql ~]# yum install httpd
Install Php package
with php-mysql
[root@mysql ~]# yum install php php-mysql
Create phpinfo.php in /var/www/html/ and make php test file
[root@mysql ~]# cd /var/www/html/
<?php
phpinfo();
?>
[root@mysql ~]# service httpd restart
Now, Test
Open on browser
Permanent on service
[root@mysql ~]# chkconfig httpd on
Install phpMyAdmin
To access mysql server on gui need to install phpMyAdmin package.
Install epel repo
CentOS/RHEL 6 64-Bit
#wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@mysql ~]#rpm -ivh epel-release-6-8.noarch.rpm
[root@mysql ~]#yum install
phpMyAdmin
Access phpmyAdmin
tool
Start apache service
[root@mysql ~]# service httpd
restart
On browser : http://192.168.0.65/phpMyAdmin/
PhpMyAdmin has been installed successfully. You can now access your mysql database graphically. To login enter username: root & Password: ************
If
Found error:
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
Check:
[root@mysql conf.d]# tail -f /var/log/httpd/error_log
[Sat Nov 28 22:54:55 2015] [error] [client 192.168.0.7]
client denied by server configuration: /usr/share/phpMyAdmin/
Solution:
Go to PhpMyAdmin config file and change with below parameter.
[root@mysql ~]#cp /etc/httpd/conf.d/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf.org
[root@mysql ~]#vim /etc/httpd/conf.d/phpMyAdmin.conf
Require ip 127.0.0.1
Replace with your workstation IP address:
Require ip 192.168.0.65
Again find the following line:
Allow from 127.0.0.1
Replace as follows:
Allow from 192.168.0.65
Save and close the file
0 comments:
Post a Comment