Migrating to MySQL
This page describes how to use FishEye/Crucible with both MySQL Enterprise Server and MySQL Community Server. Note that when they are used together, FishEye and Crucible share the same external database.
To switch to a MySQL database, install MySQL and then follow the steps below. Please note that during the migration of database servers, the FishEye/Crucible instance will not be available to users or to external API clients.
Note that for FishEye 2.9+, the JDBC driver for MySQL is not bundled with FishEye/Crucible (due to licensing restrictions).
To start with:
- Install a supported version of MySQL. Check the Supported platforms page for the exact versions that are supported. Note that MariaDB and Percona variants of MySQL are not supported, and are known to cause issues when used with FishEye.
- Download and install the JDBC driver, if necessary. Note that for FishEye 2.9+, the JDBC driver for MySQL is not bundled with FishEye/Crucible (due to licensing restrictions).
- Download the MySQL Connector/J JDBC driver from the MySQL download website.
- Expand the downloaded zip/tar.gz file.
- Copy the
mysql-connector-java-x.y.zz-bin.jarfile to your
FISHEYE_INST/libdirectory. If the
lib/directory doesn't already exist, you will need to create it.
- Restart FishEye/Crucible.
Step 1. Create a MySQL database
Set up a MySQL database as follows:
- Configure the database to use the InnoDB storage engine
- Create a database on MySQL for FishEye/Crucible to use
- Create a FishEye user on the database
- Configure the database to use
utf8character set encoding
- Configure the database to use
utf8_bincollation (to ensure case sensitivity).
Here is an example of how to do that. When FishEye/Crucible and MySQL run on the same machine (accessible through
localhost), issue the following commands (replacing
password with you own values):
This creates an empty MySQL database with the name
fisheye, and a user that can log in from the host that FIshEye is running on who has full access to the newly created database. In particular, the user should be allowed to create and drop tables, indexes and other constraints.
You will also need to set the
Server Characterset to
utf8. This can be done by adding the following in
my.ini for Windows or
my.cnf for other operating systems (create the file at /etc/my.cnf if it doesn't already exist). It has to be declared in the Server section, which is the section after
You'll need to restart MySQL for that change to take effect. Now use the
status command to verify database character encoding information:
Screenshot: Using the MySQL status command
Step 2. Configure FishEye/Crucible to use MySQL, and migrate data
In order to migrate to a different database backend, you must create a backup of sql data, configure the database and finally import the data using a backup restoration process. This can be done from either the FishEye/Crucible administration console, which streamlines the process, or using the command line tool which FishEye/Crucible provides.
Option 1: Migrate using the UI (FishEye/Crucible Administration)
- Navigate to the
Databasepage in FishEye/Crucible's Administration console.
To log in to the Admin area, you can either:
- click Administration at the foot of the page.
- navigate to
HOSTNAMEis the name of the server on which you installed Fisheye.
Once logged in as an administrator you can also get to the Admin area by clicking the 'cog' menu in the FishEye/Crucible header, and choosing Administration.
- Choose Edit > Test Connection to verify that FishEye/Crucible can log in to the database.
- Select MySQL from the database type.
- Fill in the appropriate fields, replacing the host, port, database name, username and password using the same connection details as used when creating the MySQL database in Step 1 above.
- Click Test Connection to validate the values.
Screenshot: Testing the connection
If this fails, verify that you have the MySQL JDBC driver
.jarfile in the classpath (see Prerequisites section above for instructions on how to install the driver). Also, ensure that the database user can log in to the database from the machine that FishEye/Crucible is running on and that all the required privileges are present.
- Click Save & Migrate to start the migration process.
During the migration process (which will take several minutes, depending on the size of your database and network throughput), the product will be inaccessible to users and external API clients. Users will see a maintenance screen that informs them of the process. Should the migration fail for any reason, FishEye/Crucible will not switch to the new database, and will report on the encountered problems. Because the destination database may now contain some, but not yet all data, drop all tables, indexes and constraints before attempting a new migration.
Screenshot: Migrating the database
Option 2: Migrate using the command line
- Create a backup of the
sqldata from the FishEye/Crucible instance. Read Backing up and restoring FishEye data and Backing up and restoring Crucible data for information on how to create a backup.
Run the following command from the
<FishEye installation directory>/bindirectory:
- When the import is complete, FishEye/Crucible can be started and will use MySQL.
Was this helpful?
Thanks for your feedback!