Run the MySQL command line client in either Linux or MS Windows environment and enter following instructions from the Tigase installation directory:
mysql -u root -p
Once logged in, create the database for the Tigase server:
mysql> create database tigasedb;
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.
mysql> GRANT ALL ON tigasedb.* TO tigase_user@'%' IDENTIFIED BY 'tigase_passwd';
-
Grant access to tigase_user connecting from localhost.
mysql> GRANT ALL ON tigasedb.* TO tigase_user@'localhost' IDENTIFIED BY 'tigase_passwd';
-
Grant access to tigase_user connecting from local machine only.
mysql> GRANT ALL ON tigasedb.* TO tigase_user IDENTIFIED BY 'tigase_passwd';
And now you can update user permission changes in the database:
mysql> FLUSH PRIVILEGES;
Important
It’s essential to enable log_bin_trust_function_creators option in MySQL server, for example by running:
mysql> SET GLOBAL log_bin_trust_function_creators = 1;
Starting with v8.0.0 the Schemas are no longer linked, and will need to manually be installed in the following order.
Switch to the database you have created:
mysql> use tigasedb;
Note
We are assuming you run the mysql client in Linux from the Tigase installation directory, so all file links will be relative.
Next install the schema files:
mysql> source database/mysql-common-0.0.1.sql;
You will need to repeat this process for the following files:
mysql-common-0.0.1.sql mysql-common-0.0.2.sql mysql-server-7.0.0.sql mysql-server-7.1.0.sql mysql-server-8.0.0.sql mysql-muc-3.0.0.sql mysql-pubsub-3.1.0.sql mysql-pubsub-3.2.0.sql mysql-pubsub-4.0.0.sql mysql-http-api-2.0.0.sql
Other components may require installation such as:
mysql-socks5-2.0.0.sql mysql-push-1.0.0.sql mysql-message-archiving-2.0.0.sql mysql-unified-archive-2.0.0.sql
On Windows you have probably to enter the full path, assuming Tigase is installed in C:\Program Files\Tigase:
mysql> source c:/Program Files/Tigase/database/mysql-common-0.0.1.sql; mysql> source c:/Program Files/Tigase/database/mysql-common-0.0.2.sql; mysql> source c:/Program Files/Tigase/database/mysql-server-7.0.0.sql; and so on...