Skip to content

Database server

Benoît edited this page Apr 11, 2018 · 2 revisions

Database

To set DBMS, set the DB_TYPE environment variable to mysql or pgsql.

See the dedicated environment variable page.

mySQL

Server requirement

sudo apt-get install -y mariadb-server mariadb-common mariadb-client
sudo mysql -uroot -e "CREATE USER 'emedia'@'localhost' IDENTIFIED BY 'emedia';"
sudo mysql -uroot -e "GRANT ALL ON *.* TO 'emedia'@'localhost';"

PostgreSQL

Server requirement

sudo apt-get -y install postgresql phppgadmin
sudo -u postgres psql -c "CREATE USER emedia WITH PASSWORD 'emedia' CREATEDB;"

Configuration

Edit /etc/postgresql/10/main/pg_hba.conf:

#allow only webserver access,eg: 1.2.3.4
host  all  all 1.2.3.4/0 md5

Edit /etc/postgresql/10/main/postgresql.conf:

listen_addresses ='*' 
Clone this wiki locally