This will start Lisk Service with the default configuration, which in turn will connect to a Lisk Core Mainnet node.
In case a different node or network shall be used, configure Lisk Service accordingly.
Reset Lisk Service database
To reset the database of Lisk Service, drop the respective MYSQL and Redis databases.
Before resetting the database, stop Lisk Service:
Now connect to the Docker container in which you wish to reset the database. If you are not sure what to choose here, check the available containers via Show status of Docker containers.
$ docker exec -it lisk-service_mysql_core_1 bash (1)
|1||Connect to the interactive shell of the MYSQL Docker container in which you wish to reset the MYSQL database.|
Drop MYSQL DB
root@f1413b535254:/# mysql -u lisk -ppassword (1) mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2044 Server version: 8.0.27 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> drop database lisk; (2) mysql> create database lisk; (3) mysql> quit; (4)
|1||Login to MYSQL with the
|3||Create a fresh database
|4||Log out from MYSQL by typing
Flush Redis DB
Reset the databases for Redis after dropping the MYSQL database:
sudo docker exec -it lisk-service_redis_core_persistent_1 /bin/sh redis-cli flushall
|Log out of the docker container again by pressing CRTL + D.|
For more information check the Redis documentation: FLUSHALL
To flush only a particular DB in Redis, execute the following command instead:
redis-cli -n <db_number> flushdb
To check the logs for the different microservices of Lisk Service, use the command
docker container logs CONTAINER, where
CONTAINER is the respective Docker container that holds the logs you wish to view.
For example, to see the logs for the Gateway microservice, execute:
docker container logs lisk-service_gateway_1