Installing phpmyadmin to VPS/linux

You can manipulate your users and databases with SSH access, but then again its nicer and easier on the brain to make it trough visual interface (for most, some will probably work it faster in prompt). But for that you still need to install phpmyadmin through lines of SSH access.

For each virtual host that you would like to give access to your PHPMyAdmin installation, you must create a symbolic link from the document root to the phpMyAdmin installation location which is probably (/usr/share/phpmyadmin)

Change directory to your document root and issue the following commands to create the symbolic link (be sure to substitute the proper paths for your particular configuration):

cd /srv/www/example.com/public_html
ln -s /usr/share/phpmyadmin

and you will be able to run phpMyAdmin with www.example.com/phpmyadmin where you login with your root or some other user that has access.

If you want to make this for all of your sites on VPS, do this.

Open the file named httpd.conf and find the following section;

<Directory /> 
   Options FollowSymLinks 
   AllowOverride None 
</Directory>

Directly under this section add the following

<Directory "/usr/local/apache/htdocs/phpmyadmin"> 
   AuthType Basic 
   AuthName "myphp" 
   AuthUserFile /usr/local/apache/passwd/authpass 
   Require user myphp 
</Directory>

Thats it, save the file and close it, then restart Apache by issuing the following command;

/usr/local/apache/bin/apachectl restart

Also adjust access rights

In /etc/webapps/phpmyadmin/.htaccess, comment out deny from all. The line should look like this:

#deny from all

Alternatively, you can restrict access to localhost and your local network only. Replace 192.168.1.0/24 with your network's IP block.

deny from all
allow from localhost
allow from 192.168.1.0/24