Install PHPMyadmin on VPS

PHPMyadmin is an invaluable tool for managing MySql databases. Installing PhpMyadmin on your VPS is very easy:

(i) Go to the PHPMyadmin site to see which is the latest version. Currently, it is 3.5.1-all-languages.tar.gz.

So, lets download the file:

wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.5.1/phpMyAdmin-3.5.1-all-languages.tar.gz

Now unpack it:

tar xvfz phpMyAdmin-3.5.1-all-languages.tar.gz

It will unpack to a folder called phpmyadmin in the root folder which is not accessible from the browser. So, check where the root of your site is and copy its contents to another folder called “phpmyadmin”. In my set up (nginx), the root is at /usr/local/nginx/html. Yours could be under /var/www/html/ or under /home/nginx/domains/mysite. You can check the root destination by creating a phpinfo file.

Now create the phpmyadmin folder at the desired location with the following command:

cd /usr/local/nginx/html
mkdir phpmyadmin

Now go back into the extracted phpmyadmin folder and copy its contents to the newly created folder:

cp -R * /usr/local/nginx/html/phpmyadmin

Restart apache webserver

/etc/init.d/httpd restart

If it is a nginx sever, use the command

nginx -s reload

Now, when you access your_domain/phpmyadmin, you will be greeted by the login page. Just login with your name as root and your root password. If there is a password problem, go to the webmin’s MySQL and reenter your password.

Leave a Reply

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