Search


print PDF Ireland

How to centralise phpMyadmin


Introduction

The aim of this manual is to help you to install only one version of phpMyadmin for all your bases and therefore all your domains. The interest of this operation is to administrate only once phpMyadmin in case of up dates or breakdowns. If you use a recent version of an OVH installation, your phpMyAdmin is probably already correctly configured.


Configuration

  • New user

In order to use the functionality of centralisation of phpMyadmin, you have to create a special user in mysql, very easy to set up:

1. Find a complicated password (you will never type it again)
2. Go to phpMyAdmin (or in text consol of mysql) and after having replaced in the first following command YOURPASSWORD by the complicated one that you found
3. Launch the following commands

GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'YOURPASSWORD';

GRANT SELECT (Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv,
Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv,
Grant_priv, References_priv, Index_priv, Alter_priv)
ON mysql.user TO 'pma'@'localhost';

GRANT SELECT ON mysql.db TO 'pma'@'localhost';

GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO 'pma'@'localhost';

  • Change the configuration file

1. Go to /home/ovh/www/phpMyAdmin directory:

cd /home/ovh/www/phpMyAdmin

2. Save your previous configuration file:

mv config.inc.php config.inc.php-sav

3. Then recover this recent configuration file and change the password :

wget guides.ovh.co.uk/misc/config.inc.tar.gz; tar xzvf config.inc.tar.gz

Next edit this file to replace YOURPASSWORD by the correct one (see previous steps). Change rights and the owner file:

chown ovh.ovh config.inc.php
chmod 644 config.inc.php

  • Remove eventual htaccess file

If you would have protected your directory from phpMyAdmin with htaccess file, deactivate this protection:

mv .htaccess .no-htaccess

Last touch

You may change the mysql password of root user if it is still the same as the one of login for more safety reasons:

mysqladmin -u root password XXXXXX