Configuring From the Linux Shell Command Line

Follow steps below to prepare the MySQL database:

  1. Create the database space for the Tigase server:
mysqladmin -p create tigasedb
  1. Add the tigase_user user and grant him access to the tigasedb database. Depending on how you plan to connect to the database (locally or over the network) use one of following commands or all if you are not sure: Grant access to tigase_user connecting from any network address.
echo "GRANT ALL ON tigasedb.* TO tigase_user@'%' \
            IDENTIFIED BY 'tigase_passwd'; \
            FLUSH PRIVILEGES;" | mysql -u root -pdbpass mysql

Grant access to tigase_user connecting from localhost.

echo "GRANT ALL ON tigasedb.* TO tigase_user@'localhost' \
            IDENTIFIED BY 'tigase_passwd'; \
            FLUSH PRIVILEGES;" | mysql -u root -pdbpass mysql

Grant access to tigase_user connecting from local machine only.

echo "GRANT ALL ON tigasedb.* TO tigase_user \
            IDENTIFIED BY 'tigase_passwd'; \
            FLUSH PRIVILEGES;" | mysql -u root -pdbpass mysql
  1. Load database schema to initialize the Tigase server (version below 4.0) database space:
mysql -u dbuser -p tigasedb < mysql-schema.sql

For the Tigase server version 4.0 and later:

mysql -u dbuser -p tigasedb < mysql-schema-4.sql

The initialization schema file should be also available locally in database/ directory of your Tigase installation.