Install Database
For test and development purposes you can skip the steps in this section: all forum-related data will then be stored in your main Content Engine database. For a production system, you are strongly recommended to create a separate database for your forum data, located on a separate host. This section describes how to do that.
The following instructions describe how to install and set up MySQL for use by the Forum plugin.
-
Log in as
root
on your forum-database-host. -
Install the MySQL server and client packages:
#
apt-get install mysql-server mysql-clientDuring the installation you will be asked to specify a root password for the database.
-
Log in to the system and create a database:
#
mysql -pmysql>
create database db-name character set utf8 collate utf8_general_ci;Query OK, 1 row affected (0.00 sec) mysql>
grant all on db-name.* to user@'%' identified by 'password';Query OK, 0 rows affected (0.00 sec) mysql>
grant all on db-name.* to user@'localhost' identified by 'password';Query OK, 0 rows affected (0.00 sec) mysql>
exitReplace db-name, user and password in the above commands with a database name, user name and password of your choice. db-name must, of course be different from the name of your main Content Engine database.
-
Still on your forum-database-host, change user to
escenic
. -
You now need to run the Forum database scripts. If you have a single-host installation, then you will find them in
/opt/escenic/plugins/forum/misc/database/mysql
. If you have a multi-host installation with shared folders, then you have direct access to the distribution file and can just unpack it to a temporary location as follows:$ cd /tmp $ unzip /mnt/download/forum-3.3.1.145241.zip
You will then find the scripts in
/tmp/forum/misc/database/mysql
. If you don't have a shared folder set-up then you can either download the package from Escenic Technet again and unpack it, or copy the scripts over from your assembly-host.Once you have located the scripts, you can run them as follows:
$
cd script-folder$
for el in tables.sql constraints.sql indexes.sql; do>
mysql -u user -ppassword db-name < $el>
done;where script-folder is the path of the folder containing the scripts.
-
On some platforms, external access to the MySQL server is disabled by default. To enable external access, you need to bind the
mysql
process to the forum-database-host's IP address. To do this, you need to open/etc/mysql/my.cnf
for editing (asroot
again) and set thebind-address
parameter:bind-address = forum-database-host-ip-address
-
Verify that the MySQL server is running and accessible by trying to connect to port 3306 from each of your other hosts using
telnet
:$
telnet forum-database-host 3306where forum-database-host is the host name or IP address of the forum-database-host. If a connection is opened, then the database server is running and accessible.