Follow steps below to prepare the MySQL database:
mysqladmin -p create tigasedb
echo "GRANT ALL ON tigasedb.* TO tigase_user@'%' \
IDENTIFIED BY 'tigase_passwd'; \
FLUSH PRIVILEGES;" | mysql -u root -pdbpass mysqlGrant 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 mysqlGrant 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 mysqlmysql -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.