To reset the database of Lisk Service, drop the respective MYSQL and Redis databases.
# Stop Lisk Service $ npm stop # Login to MYSQL with the lisk user $ mysql -u lisk -ppassword # Drop the database mysql> drop database lisk; # Create fresh database mysql> create database lisk; mysql> quit; # Quit MYSQL
|When Lisk Service is started again after a database reset, then the process to reindex all the data is initiated. This can be quite time-consuming and may take up to 2 hours.|
Reset the databases for Redis after dropping the MYSQL database:
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
pm2 logs PROCESS_NAME, where
PROCESS_NAME is the respective PM2 managed process that contains the logs you wish to view.
For example, to see the logs for the Gateway microservice, execute:
pm2 logs lisk-service-gateway