Skip to content

Configure Rainloop storage in MariaDB

Andrew Savinykh edited this page Sep 18, 2020 · 1 revision

This is configured on the Contacts tab of the Rainloop admin interface (at https://webmail.domain.tld/?admin):

You will have to create a database in MariaDb and create the rainloop user with access to this database.

Generate a new database password for a Rainloop user, and specify the root MariaDb password:

 export MYSQL_ROOT_PASSWORD=your_root_db_password
 export MYSQL_RAINLOOP_PASSWORD=your_rainloop_db_password

Then, run the following to create the required objects:

docker exec mariadb sh -c "exec mysql -u root -p$MYSQL_ROOT_PASSWORD -e'CREATE DATABASE rainloop;'"
create_user="CREATE USER rainloop IDENTIFIED BY \"$MYSQL_RAINLOOP_PASSWORD\" ;"
exec_sql="exec mysql -u root -p$MYSQL_ROOT_PASSWORD -e'$create_user'"
docker exec mariadb sh -c "$exec_sql"
docker exec mariadb sh -c "exec mysql -u root -p$MYSQL_ROOT_PASSWORD -e'GRANT ALL ON rainloop.* TO rainloop;'"

Now you are ready to enter the new password and other details to the interface on the screenshot above.