Installing phpMyAdmin in my Cent OS 5.3

I did this by yum, which i think is the easiest way.

[root@localhost ~]# yum install phpmyadmin

This will install it in /usr/share/phpmyadmin

Now, configure it by editing

[root@localhost html]# gedit /usr/share/phpmyadmin/ 

add the blowfish secret,
$cfg['blowfish_secret'] = 'a8b7dafdferHJHJ^&U^45776TIUuiYc6d';

and i also changed to mysqli in,
$cfg['Servers'][$i]['extension'] = 'mysqli';

Now you could access the phpMyAdmin by,

This is possible because an alias is created for apache to the directory where phpMyAdmin in installed [ie /usr/share/phpmyadmin]. This is done in the file,

[tony@localhost ~]$ gedit /etc/httpd/conf.d/phpmyadmin.conf

You will see a lines like,
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin


You could also install phpMyAdmin manually by downloading phpMyAdmin.
Make sure you download the version 2.xx and not 3.xx[requires PHP 5.2] as Cent OS 5.3 has only PHP 5.1 by default

Extract the tar.gz file to your desktop.

Copy it to /var/www/html/phpmyadmin as root,

[root@localhost ~]# mv /home/tony/Desktop/phpMyAdmin-3.2.1-all-languages /var/www/html/phpmyadmin

Give the appropriate permission for apache,
Set owner as apache

[root@localhost html]# chown apache -R /var/www/html/phpmyadmin/

Set the group owner as your user, this is good as you can edit the files easily,

[root@localhost html]# chgrp tony -R /var/www/html/phpmyadmin/

Now give group user the write permission

[root@localhost html]# chmod g+w -R /var/www/html/phpmyadmin/

Now, add the blowfish secret and mysqli extension as above,

Thats all.

13 thoughts on “Installing phpMyAdmin in my Cent OS 5.3

  1. admin

    Hi Sadesh,
    PhpMyAdmin 3.2+ requires PHP 5.2 which is not available in CentOS 5.3 by default. This might be the reason. Try using phpmyadmin 2.11 . I have noted this in the post. [although i now see that in the code it is written wrongly].

    If you have PHP5.2 or later, Check if the files are present.
    Any difference if you try ?


  2. Sadesh

    Thank you admin for the fast reply. I have PHP 5.3.1 installed. The files of phpmyadmin are in /usr/share/ and i have also created the alias. Restarted httpd.

    I also tried…it is still a blank page

    but, the website is working fine, which is because of working php and mysql.

  3. Sadesh

    Also, when i tried to do a database backup using webmin, get this following error;

    Database backup failed : mysqldump failed :

    mysqldump: Couldn’t execute ‘SHOW FUNCTION STATUS WHERE Db = ‘irhfr”: Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50077, now running 50142. Please use mysql_upgrade to fix this error. (1558)

    Scheduled backup for database left disabled.

    FYI, my university has automated backup of the server and the databases using also mysqldump. Are these related?

  4. sonic

    Hey Sadesh,

    Looks like you might be having some syntax errors in your conf file. And because of that the php execution is going into a fatal error and not displaying anything at all.. why don’t you try checking the syntax of your conf files using php -l

    for eg. php -l /usr/share/phpmyadmin/

    The ideal way to tackle this would be to do a tail -f on the apache error logs and see what errors are getting printed, and then you’ll have a better idea. Do let us know if this helped.


  5. Sadesh

    Thank you Sonic for the reply. This is what I got after execution of the php -l command;

    *** No syntax errors detected in /usr/share/phpmyadmin/ ****

    Regarding “The ideal way to tackle this would be to do a tail -f on the apache error logs and see what errors are getting printed, and then you’ll have a better idea.”

    How do I do this? thanks again.

    – Sadesh

  6. tony Post author

    Hi Sadesh,
    You have to find your apache error log files, in Cent OS and similar distros its in

    Next, giving tail -f anyfilename will print out the latest entries in that text file real time.

    In short, you do a tail -f yourapacheerrorlog in a shell, and then try to access the phpmyadmin in browser, to see what errors are getting printed.

    Btw, why dont you also try to do a manual installation of phpMyAdmin (as said in the second part of the article) and see if it works.

  7. Sadesh

    Thank you very much tony. I have no idea what I did except,

    mysqlcheck –check-upgrade –all-databases –auto-repair

    shell> mysql_upgrade

    Now, my phpmyadmin and webmin mysql db backup are working just fine. Again, I see following errors in the log, when I did as u instructed me.

    [Tue Feb 02 16:37:08 2010] [error] [client] PHP Deprecated: Function eregi() is deprecated in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 146

    [Tue Feb 02 16:37:11 2010] [error] [client] PHP Deprecated: Function ereg_replace() is deprecated in /usr/share/phpmyadmin/libraries/check_user_privileges.lib.php on line 34, referer: http://localhost/phpMyAdmin/index.php?lang=en-iso-8859-1&convcharset=iso-8859-1&collation_connection=utf8_unicode_ci&token=c9487836fccbc97339ca147cec4d13a9

    Thanks a lot.

  8. admin

    Good that you got it working.

    Regarding the error message: A quick google search shows that PHP 5.3 no longer supports those functions. Your phpMyAdmin seems not fully compatible with 5.3 yet.
    Anyway, since things are working better don’t bother about it.. :)


Leave a Reply

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

four + 5 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>