1. The setup
  2. Create the vserver
    1. vserver configuration
  3. Install nullmailer in the vserver
  4. Install mysql in the vserver
  5. Configure mysql

Installing the mysql server into a vserver for syscp:

The setup

The database server (mysql) sits in its own vserver, the mysql interaction happens through the network. The vserver has two interfaces, one that has the IP 127.0.0.3, and the other has the same IP as the host system (in this case: 69.90.134.159).

Create the vserver

... details at deb.riseup.net/vserver

vserver mysql build -m debootstrap --hostname mysql --interface eth0:127.0.0.3

vserver configuration

In /etc/vservers/mysql do the following:
# cd interfaces
# mkdir 1
# cd 1
# cat > ip
69.90.134.159
^D
# cat > prefix
25
^D
# touch nodev
Then start up the mysql vserver:
host# vserver mysql start

Install nullmailer in the vserver

host# vserver mysql enter
mysql# apt-get install nullmailer
Set remote to be mail.revolt.org (this will be /etc/nullmailer/remotes), and set the admin address to be "root@riseup.net" (this is /etc/nullmailer/adminaddr)

Make sure that /etc/hostname is "mysql" and that /etc/mailname is "mysql.revolt.org" if you make any changes to these, you need to restart nullmailer.

Install mysql in the vserver

host# vserver mysql enter
mysql# apt-get install mysql-server

Configure mysql

mysql# mysqladmin -u root password 'new-password' 

/etc/mysql/my.cnf should have:
bind-address            = mysql

Add the following to /etc/hosts (in the vserver, and on all the other vservers accessing it):

127.0.0.3       mysql