Previous Topic

Next Topic

Book Contents

Setting Up Remote Database Hosting

If you are going to use a Plesk-managed server as a remote database server, you do not need to install MySQL software: Plesk comes with MySQL software, which is automatically installed during installation of Plesk. In this case, you only need to enable network access to this database server and then register it with Plesk.

To set up a MySQL database server:

  1. Copy to your server a MySQL distribution package from your operating system distribution disk, or download it from www.mysql.com site and save it on your server.
  2. Log in as root to your server and change to the directory where you saved the RPM distribution. Type the following command at the prompt:

    rpm -ivh mysql_file_name.rpm

  3. Set the database server administrator's password. Type the following command at the prompt:

    mysqladmin -u root password your_desired_password

    Change your_desired_password to anything you like.

  4. Now proceed to the instructions on registering your database server with Plesk.

To set up a PostgreSQL database server:

  1. Copy to your server a PostgreSQL distribution package from your operating system distribution disk, or download it from www.postgresql.org site and save it on your server.
  2. Log in as root to your database server and change to the directory where you saved the distribution package.
  3. Install the package in a way suitable for your operating system.
  4. Open the file /var/lib/pgsql/data/postgresql.conf with a text editor. If you are installing PostgreSQL version below 8, add the line tcpip_socket = true to this file. If you are installing PostgreSQL version higher than 8, add the line listen_addresses = '*'.
  5. Open the file /var/lib/pgsql/data/pg_hba.conf with a text editor and make sure the following lines are there:

    # local DATABASE USER METHOD [OPTION]

    local samegroup all password

    # host DATABASE USER IP-ADDRESS IP-MASK METHOD [OPTION]

    host samegroup all 0.0.0.0 0.0.0.0 md5

  6. To restart PostgreSQL, issue the following command at the prompt:

    service postgresql restart.

  7. To set the database server administrator's password, type the following command at the prompt (change 'your_desired_password' to anything you like):

    postgresql -u root password your_desired_password

  8. Now proceed to the instructions on registering your database server with Plesk.

To register a database server with Plesk:

  1. Log in to Plesk.
  2. Click the Server shortcut in the navigation pane.
  3. Click the Database Servers icon in the Services group.
  4. Click the Add Database Server icon in the Tools group.
  5. Specify the properties of the database server:
  6. Click OK.