# First you need to have the mysql client:
sudo apt install mysql-client-core-8.0
# Then you need to get your microstack mysql password,
# so type the below to see it:
sudo snap get microstack config.credentials.mysql-root-password
# Remember the above password
# Now type:
sudo mysql -u root -p -S /var/snap/microstack/common/run/mysql/mysqld.sock
# Then add the password from above