How can I access database

Take a look at our FAQ: How can I run a SQL command when using a Docker Install?

Please do note that unless you have a specific reason you should not interact directly with the database as that can cause issues.