Accessing Bitbucket Server's H2 embedded database
While the H2 database is not supported for production environments, sometimes admins will need access for testing purposes.
- Bitbucket Server を停止します。
- Login to the server as the user that runs Bitbucket Server
- Run the following command which will open a console connection to the database:
java -cp <BITBUCKET_INSTALLATION>/atlassian-bitbucket/WEB-INF/lib/h2-1.3.176.jar org.h2.tools.Shell
- Update the path above to reflect where Bitbucket Server is installed
- When prompted for the URL enter:
- Update the path above to reflect the location of the Bitbucket Home directory
- Press enter when asked which driver to use
- Enter sa for the user
- Press enter twice when prompted for the password (no password is required)
If successful, you'll be prompted with
sql> and can enter any SQL commands required.