Install MySQL

Configuration

On this VPS, MySQL is already installed. For configuration, do the following:

  • enable the MySQL service:
/sbin/chkconfig mysqld on
  • start the MySQL server:
/sbin/service mysqld start
  • set the MySQL root password:
mysqladmin -u root password 'new-password'

Install phpMyAdmin

yum -y install phpmyadmin

Add the IP addresses from which you want to connect to phpMyAdmin. This should normally be the IP address from which you need to access phpMyAdmin; do not grant access to wildcards, as this is a severe security issue.

vim /etc/httpd/conf.d/phpMyAdmin.conf
allow from 123.123.123.123

Modify 2 lines in the settings file /etc/phpMyAdmin/config.inc.php:

$cfg['blowfish_secret'] = 'ba17c1ec07d65003';  // use here a value of your choice
$cfg['Servers'][$i]['auth_type'] = 'cookie';

Restart apache…

/etc/init.d/httpd restart

Login through phpMyAdmin as root and add new users. Make sure they get access from localhost only.

Check that the service is started at boot time:

chkconfig  --list mysqld