![]() ![]() You can migrate Bitbucket Server to the MySQL or MariaDB database created above, either from the embedded database or from another external database. Migrate Bitbucket Server to the MySQL / MariaDB database Stop, and then restart Bitbucket Server.Copy the mysql-connector-java-5.1.XX-bin.jar file from the extracted directory to your /lib directory (for Bitbucket Server 2.1 or later).The MariaDB Java Client is not compatible with Bitbucket Server and is not supported. The MySQL Connector/J must be used for both MySQL and MariaDB. The MariaDB Java Client is not compatible with Bitbucket Server You need to download and install the driver yourself, after you have installed Bitbucket Server.ĭownload the MySQL Connector/J JDBC driver from the download site. The JDBC drivers for MySQL / MariaDB are not bundled with Bitbucket Server (due to licensing restrictions). The maximum number of connections is a configurable system property – see Database pool. Note that Bitbucket Server will generally require about 25–30 connections to the database. If the MySQL / MariaDB database and Bitbucket Server instances are on different computers, just replace the localhost part of the GRANT ALL statement above with the hostname of the machine that Bitbucket Server is running on. If the MySQL / MariaDB database and Bitbucket Server instances are on the same physical computer, you can use localhost and not set a password by omitting IDENTIFIED BY 'password' from the 2nd MySQL statement above (if you trust the security within this computer). In particular, the user should be allowed to create and drop tables, indexes and other constraints. This creates an empty MySQL / MariaDB database with the name bitbucket, and a user that can log in from the host that Bitbucket Server is running on who has full access to the newly created database. Mysql> GRANT ALL PRIVILEGES ON bitbucket.* TO FLUSH PRIVILEGES ![]() Mysql> CREATE USER IDENTIFIED BY 'password' Mysql> CREATE DATABASE bitbucket CHARACTER SET utf8 COLLATE utf8_bin Refer to the MySQL documentation. Note that Bitbucket Server sets the MySQL / MariaDB transaction isolation level to READ-COMMITTED when it connects to the database. If MySQL or MariaDB is using binary logging, configure the database to use a binary logging format of either MIXED or ROW. Note that Bitbucket Server on MySQL and MariaDB does not support 4 byte UTF-8 characters.Ĭonfigure the database to use utf8_bin collation (to ensure case sensitivity). Migrate Bitbucket Server to the MySQL / MariaDB database.īefore you can use Bitbucket Server with MySQL or MariaDB, you must set up the MySQL or MariaDB server as follows:Ĭreate a database on MySQL or MariaDB for Bitbucket Server to use.Ĭreate a Bitbucket Server user on the database.Ĭonfigure the database to use utf8 character set encoding.Create the database and user on the MySQL / MariaDB server for Bitbucket Server to use.It is assumed here that you already have MySQL or MariaDB installed and running. Install MySQL or MariaDB where it is accessible to Bitbucket Server.The overall process for using a MySQL or MariaDB database with Bitbucket Server is: See Supported platforms for the versions of MySQL and MariaDB supported by Bitbucket Server. Please see Connect Bitbucket to an external database for instructions on migrating your data to one of these other engines.īitbucket Server only supports MySQL JDBC version 5.1. ![]() However, under very heavy load you will generally get better performance with any of the other database engines supported by Bitbucket Server (such as PostgreSQL which is also freely available) than you will with MySQL or MariaDB. See for some general information on this.īitbucket Server does its best to work around the MySQL / MariaDB behavior - see issues STASH-4517, STASH-4701 and others for example. These issues are intrinsic to MySQL and MariaDB (no other database engine in Bitbucket Server's Supported platforms shares this behavior) and are due to the way MySQL and MariaDB perform row-level locking in transactions. MySQL and MariaDB, while supported by Bitbucket Server, are currently not recommended especially in larger instances, due to inherent performance and deadlock issues that occur in this database engine under heavy load.Īffected systems may experience slow response times, deadlock errors and in extreme cases errors due to running out of database connections. ![]()
0 Comments
Leave a Reply. |