centos : rhel: install and configure phpmyadmin administration of mysql database server

6

Click here to load reader

Upload: luis-antonio-fernandez

Post on 22-Oct-2015

58 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CentOS : RHEL: Install and Configure PhpMyAdmin Administration of MySQL Database Server

Main menuBASH ShellLinux

CentOSDebian / UbuntuUbuntu LinuxSuseRedHat and FriendsSlackware Linux

UNIXAIXMac os xFreeBSDFreeBSD Jails (VPS)OpenbsdSolaris

TroubleshootingNginxNetworkingMySQLSee all tutorial topics

BlogAbout

Contact usForumRSS/FEED

Linux FAQ / Howtos

CentOS / RHEL: Install and Configure phpMyAdminAdministration Of MySQL Database Serverby nixCraft on July 25, 2012 · 4 comments· last updated at July 25, 2012

How do I install phpMyAdmin to handle the administration of MySQL database server over the World Wide Web under Fedora /Scientific / CentOS / RHEL / Red Hat Enterprise Linux 6.x server systems?

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the World Wide Web. Most frequentlyused operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, while you stillhave the ability to directly execute any SQL statement. It comes with an intuitive web interface, support for most MySQL features.

Step #1: Turn on EPEL repophpMyAdmin is not included in default RHEL / CentOS repo. So turn on EPEL repo as described here:$ cd /tmp$ wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm# rpm -ivh epel-release-6-5.noarch.rpm

Step #2: Install phpMyAdminType the following command:# yum search phpmyadmin# yum -y install phpmyadminSample outputs:

CentOS / RHEL: Install and Configure phpMyAdmin Administr... http://www.cyberciti.biz/faq/centos-fedora-redhat-linux-installi...

1 de 6 16/01/13 21:29

Page 2: CentOS : RHEL: Install and Configure PhpMyAdmin Administration of MySQL Database Server

Loaded plugins: rhnpluginSetting up Install ProcessResolving DependenciesThere are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.--> Running transaction check---> Package phpMyAdmin.noarch 0:3.5.1-1.el6 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================================== Package Arch Version Repository Size==================================================================================================Installing: phpMyAdmin noarch 3.5.1-1.el6 epel 4.2 MTransaction Summary==================================================================================================Install 1 Package(s)Total download size: 4.2 MInstalled size: 17 MDownloading Packages:phpMyAdmin-3.5.1-1.el6.noarch.rpm | 4.2 MB 00:00Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : phpMyAdmin-3.5.1-1.el6.noarch 1/1 Verifying : phpMyAdmin-3.5.1-1.el6.noarch 1/1Installed: phpMyAdmin.noarch 0:3.5.1-1.el6

Step #3: Configure phpMyAdminYou need to edit /etc/httpd/conf.d/phpMyAdmin.conf, enter:# vi /etc/httpd/conf.d/phpMyAdmin.confIt allows only localhost by default. You can setup HTTPD SSL as described here (mod_ssl) and allow LAN / WAN users or DBA user tomanage the database over www. Find line that read follows

Require ip 127.0.0.1

Replace with your workstation IP address:

Require ip 10.1.3.53

Again find the following line:

Allow from 127.0.0.1

Replace as follows:

Allow from 10.1.3.53

Save and close the file. Restart Apache / httpd server:# service httpd restartOpen a web browser and type the following url:https://your-server-ip/phpMyAdmin/ORhttp://your-server-ip/phpMyAdmin/Sample outputs:

CentOS / RHEL: Install and Configure phpMyAdmin Administr... http://www.cyberciti.biz/faq/centos-fedora-redhat-linux-installi...

2 de 6 16/01/13 21:29

Page 3: CentOS : RHEL: Install and Configure PhpMyAdmin Administration of MySQL Database Server

Fig.01: phpMyAdmin in Action

Please note that you will be prompted for a username and password. You need to provide your database username and password to login intothe user interface. If you want to manage all database use mysql admin user account called root. phpMyAdmin configuration file is located at/etc/phpMyAdmin/config.inc.php. You can edit this file using a text editor:# vi /etc/phpMyAdmin/config.inc.phpAll directives are explained in Documentation.html and on phpMyAdmin wiki.

Check out related mediaThis tutorial is also available in video format:

(Video.01: Installing phpMyAdmin Demo)

TweetTweet 7

0

Me gusta 3

StumbleUpon

CentOS / RHEL: Install and Configure phpMyAdmin Administr... http://www.cyberciti.biz/faq/centos-fedora-redhat-linux-installi...

3 de 6 16/01/13 21:29

Page 4: CentOS : RHEL: Install and Configure PhpMyAdmin Administration of MySQL Database Server

You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

30 Handy Bash Shell Aliases For Linux / Unix / Mac OS XTop 30 Nmap Command Examples For Sys/Network Admins25 PHP Security Best Practices For Sys Admins20 Linux System Monitoring Tools Every SysAdmin Should Know20 Linux Server Hardening Security TipsLinux: 20 Iptables Examples For New SysAdminsTop 20 OpenSSH Server Best Security PracticesTop 20 Nginx WebServer Best Security Practices20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors15 Greatest Open Source Terminal Applications Of 2012 My 10 UNIX Command Line MistakesTop 10 Open Source Web-Based Project Management SoftwareTop 5 Email Client For Linux, Mac OS X, and Windows UsersThe Novice Guide To Buying A Linux Laptop

{ 4 comments… read them below or add one }

1 vonskippy July 26, 2012 at 1:07 am

MySQL Workbench, SQLyog, or HeidiSQL are all better tools and come without the bloat and security holes.

Or you could spend a few minutes and learn to manage MySQL via CLI and not have the boatload of security risks that phpMyAdminbrings.

I don’t get why everyone just “luvs” phpmyadmin, and yet still they wonder why/how their servers get compromised.

Reply

2 Mac July 26, 2012 at 12:56 pm

If someone needs phpmyadmin add another alias interface (ip address) and put in a rule to only allow this through a gateway and/orip-range.

For some end users at an ISP they want this and using an ipchain you can lock it down, additional security.

Reply

3 munin July 27, 2012 at 11:47 am

rename phpmyadmin folder = mydbconf, dbmysite, xdbxconfx, etcmove phpmyadmin to different subdomain = xdbxconfx.mydomain.comconfigure on different port = xdbxconfx.mydomain.com:5169force SSL, no root, configure limit and burst on port :5169 in iptables.

Reply

4 gini September 10, 2012 at 8:27 am

Nice Article…thank you

Reply

Leave a Comment

Name *

E-mail *

CentOS / RHEL: Install and Configure phpMyAdmin Administr... http://www.cyberciti.biz/faq/centos-fedora-redhat-linux-installi...

4 de 6 16/01/13 21:29

Page 5: CentOS : RHEL: Install and Configure PhpMyAdmin Administration of MySQL Database Server

Website

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <ahref="" title="">

Notify me of followup comments via e-mail

Submit

Tagged as: /etc/httpd/conf.d/phpMyAdmin.conf, /etc/phpMyAdmin/config.inc.php, enterprise linux, phpmyadmin, service httpd restart, yum command

Previous Faq: Linux sys-unconfig: Reconfigure the System Upon Next Boot

Next Faq: Add / Import .SQL file To MySQL Database Server

GET FREE TIPSMake the most of Linux Sysadmin work!

Enter your email Sign Up

Youtube | Twitter | Google +

CentOS / RHEL: Install and Configure phpMyAdmin Administr... http://www.cyberciti.biz/faq/centos-fedora-redhat-linux-installi...

5 de 6 16/01/13 21:29

Page 6: CentOS : RHEL: Install and Configure PhpMyAdmin Administration of MySQL Database Server

Surabhi Sokhavut Robert Cristina

Anoop Hyungro Dinakar Didier

nixCraft en Facebook

A 27,333 personas les gusta nixCraft.

Me gusta

Plug-in social de Facebook

Related FAQs

Add / Import .SQL file To MySQL Database ServerHowto get Red Hat Enterprise Linux Installation NumberLinux Failure (4322): Configuration Initialization Failed – Error and SolutionApply package updates from the Red Hat Network (RHN) For Red Hat Linux ServerGUI Tools for managing MySQL databases serverphpMyAdmin: Cannot load mysql extension. Please check your PHP configurationUpdate Fedora 7 LinuxCentOS / RHEL: yum Command Reinstall PackageCentOS / RHEL: Install PostgresSQL Interface for Perl (perl-DBD-Pg)RHEL Warning: RPMDB altered outside of yum

©2006-2013 nixCraft. All rights reserved. Cannot be reproduced without written permission.Privacy Policy | Terms of Service | Questions or Comments | Sitemap

CentOS / RHEL: Install and Configure phpMyAdmin Administr... http://www.cyberciti.biz/faq/centos-fedora-redhat-linux-installi...

6 de 6 16/01/13 21:29