how to access the database for Jira Service Management
You do not. You have no access to the database behind the service on Cloud.
You wouldn't want to either, the database is absolutely not designed for reporting and SQL is the worst possible way to try to report off a Jira data set.
In addition to @Nic Brough -Adaptavist- 's answer, if you need access to the "raw" data, look at the REST API which you can also use (if for reporting) with most BI tools.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.