In my system, I have installed httpd. So I just record the other steps.
Update the packages
# yum update -y
Install MySQL packages
# yum install mysql-server mysql mysql-devel
Make MySQL boot up automatically
# chkconfig mysqld on
Start MySQL service
# service mysqld start
Set the password for the root user
# mysqladmin -u root password kezhong
Install php and common packages
# yum install php php-gd php-imap php-mysql php-pear php-xml phpxmlrpc curl libxml2 php-mbstring php-mcrypt
Install phpMyAdmin
Because the version of php on CentOS 5.6 is 5.1.6, we only can install phpMyAdmin 2.x, I choose 2.11.11.3.
# cd /usr/share
# wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/2.11.11.3/phpMyAdmin-2.11.11.3-english.tar.gz/download
# tar xvfz phpMyAdmin-2.11.11.3-english.tar.gz
# mv phpMyAdmin-2.11.11.3-english phpmyadmin
# rm phpMyAdmin-2.11.11.3-english.tar.gz
# cd phpmyadmin
# cp config.sample.inc.php config.inc.php
Edit the config.inc.php file, find the line that contain “blowfish_secret”, and modify like below.
$cfg['blowfish_secret'] = ‘TypeAnything_for_Secure’;
Append a line into the /etc/httpd/conf.d/phpmyadmin.conf file
# echo “Alias /phpMyAdmin /usr/share/phpmyadmin” >> /etc/httpd/conf.d/phpmyadmin.conf
Restart the httpd service
# service httpd restart
Enter the URL http://%5BIP Address]/phpMyAdmin/ on Firefox browser, we’ll can see the login web page.
After inputting the root user and its password(kezhong), we can use phpMyAdmin to manage the MySQL.

Hey, thanks for the post.
At the final part of this setup, when adding the Alias, shouldn’t it be in
/etc/httpd/conf.d/php.conf
instead of:
/etc/httpd/conf.d/phpmyadmin.conf
By: Henrique on May 1, 2011
at 12:34 pm
thank you very much
By: kezhong on May 1, 2011
at 5:14 pm
Thanks Man. Very nice article. Basic İnstall :)
By: Mrtoxic on May 25, 2011
at 8:30 pm
CentOS allows PHP 5.3 through ‘php53′ packages, so you can install php5.3 over 5.1 and then download and install phpMyAdmin 3+
Thanks for your help! I’m new to CentOS (usually an Ubuntu server admin)
By: Brett on May 31, 2011
at 11:38 am
Uh – what about the “cookies must be enabled” error that appears in the example – it stops you from creating databases or tables.
By: Jeffrey R Barry on June 12, 2011
at 9:40 pm
Thanks for the post.
As I was following, I get the error after I added the following line to php.conf
# echo “Alias /phpMyAdmin /usr/share/phpmyadmin” >> /etc/httpd/conf.d/php.conf
When restarting service, it gives me ‘Syntax error on line 32 of /etc/httpd/conf.d/php.conf: Invalid command ‘echo’, perhaps misspelled or defied by a module not included in the server configuration.
Can I get your help on this?
Thanks!!
By: michellektechnology on June 23, 2011
at 11:11 pm
I’m sorry, I shouldn’t have put that line inside php.conf file.
That line should have been typed from command line.
By: michellektechnology on June 23, 2011
at 11:56 pm
i did’t c phpMyAdmin.conf file?
By: badrah on August 18, 2011
at 11:10 am
Stumbled again to this blog, thanks a bunch for the useful guides …
By: willowdan on August 30, 2011
at 4:26 am
Hello i take this error but i dont know why this…
Starting httpd: Syntax error on line 1 of /etc/httpd/conf.d/phpmyadmin.conf:
Alias takes two arguments, a fakename and a realname
[FAILED]
in phpmyadmin.conf i see the line
Alias /phpMyAdmin/usr/share/phpmyadmin
By: John A. on September 1, 2011
at 4:03 am
“Enter the URL http://%5BIP Address]/phpMyAdmin/ on Firefox browser, we’ll can see the login web page.”
Firefox is really necessary!
By: Daddycool on November 2, 2011
at 9:24 am
thank you very much for that guide. It helps me a lot on my project.
By: Ronald Ray on November 5, 2011
at 4:02 am
Starting httpd: Syntax error on line 1 of /etc/httpd/conf.d/phpmyadmin.conf:
Invalid command ‘.Alias’, perhaps misspelled or defined by a module not included in the server configuration
Any ideas?
By: Brandon on November 11, 2011
at 9:34 pm
remove leading and trailing “
By: Anonymous on November 26, 2011
at 3:29 pm
get this errro The requested URL /phpMyAdmin/ was not found on this server.
By: jack on November 27, 2011
at 6:23 am
Спасибо! Пропарился 3 часа. Эта статья помогла справится с проблемой.
By: Fgerty on December 27, 2011
at 9:41 am
I think you are trying by copy pest. Its wrong procedure.
You must type in command line below command….and press enter.
# echo “Alias /phpMyAdmin /usr/share/phpmyadmin” >> /etc/httpd/conf.d/phpmyadmin.conf
now see in /etc/httpd/conf.d/ folder, a new file created automatically named phpmyadmin.conf restart httpd and enjoy……
By: Wahid on February 11, 2012
at 5:49 pm
Hi, on my build of centos 5.6 I followed along and everything was good until i got to the bit about the phpmyadmin.conf
instead i edited php.conf
also in php.conf I added
Alias /randomname /usr/share/phpmyadmin
and that worked. Anything else failed. Just change randomname to whatever you want phpmyadmin to be called by in your browser after the IP address.
also, for some reason the “service” calls didnt work for me and i had to use /etc/init.d/httpd restart
or the actual paths to it. Hope this helps anyone that couldnt follow along
By: Just on April 15, 2012
at 7:23 pm
*Notice If you copy and paste you’ll end up with the . rather then ” make sure you fix this.
By: Anonymous on July 11, 2012
at 4:49 pm
how about to install the latest phpmyadmin?
By: Jayson on March 25, 2013
at 7:02 pm