diff --git a/docker-compose.yml b/docker-compose.yml index 89f55a779a..86cc0d77e4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -75,6 +75,7 @@ services: endpoint_mode: vip environment: - MYSQL_ROOT_PASSWORD=password + - MYSQL_DATABASE=lisk healthcheck: test: ['CMD', 'mysqladmin', 'ping', '-hlocalhost', '-ppassword'] diff --git a/docker/mysql/read/init/01-databases.sql b/docker/mysql/read/init/01-databases.sql index b82b1200cb..0dc1ead13c 100644 --- a/docker/mysql/read/init/01-databases.sql +++ b/docker/mysql/read/init/01-databases.sql @@ -1,3 +1,6 @@ +-- Create database(s). +CREATE DATABASE IF NOT EXISTS `lisk`; + -- Create `reader` user for read queries and grant read privilages. CREATE USER 'reader'@'%' IDENTIFIED WITH caching_sha2_password BY 'password'; GRANT SELECT ON *.* TO 'reader'@'%';