Skip to main content

Prepare the Database on Linux

In order to setup a production system you have to prepare a MySQL database where the application will store all data.
To perform this step, make sure to have a MySQL up and running, so execute the command: /etc/init.d/mysql status

Default settings

LogicalDOC requires you to configure your MySQL installation to best fit the needs of a professional DMS.

Edit your current my.cnf configuration file, and make sure to have the following settings in the [mysql] and [mysqld] sections:

[mysql]
default-character-set = utf8

[mysqld]
character-set-server = utf8
collation-server = utf8_bin
default-storage-engine = INNODB

This sets the encoding to UTF-8 and the default storage engine to the INNODB with transactions support.

Setting Password for MySQL Root User

This step is just a suggestion in case you have a fresh MySQL install, it is not needed when you have an already configured database.

Execute the following commands at a shell prompt:

$ /usr/bin/mysqladmin -u root password 'password'

Creating logicaldoc Schema

Now we need to create a database schema for logicaldoc. So connect to mysql prompt typing the command:

$ /usr/bin/mysql -u root -ppassword

Execute the following commands at the mysql prompt:

CREATE DATABASE logicaldoc;

Creating logicaldoc User Account

CREATE USER logicaldoc;
SET PASSWORD FOR logicaldoc@'%'=PASSWORD('password');

Adding Grants
Execute the following commands at the mysql prompt:

GRANT ALL PRIVILEGES ON logicaldoc.* TO logicaldoc@'%' identified by 'password';

Now we have an empty database called 'logicaldoc' with a user 'logicaldoc' that can access it using password 'password'.
You can exit the mysql prompt(command \q) and go ahead.