To switch to a MySQL Enterprise Server, install MySQL Enterprise Server and 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.
On this page:
Step 1. Install and Create a MySQL Database
Before you begin:
- Ensure you install a version of MySQL that is supported. Check the Supported Platform Matrix for exact versions.
- The JDBC drivers for MySQL Enterprise Server are bundled with FishEye/Crucible. Skip to step 2 if this meets your needs. If you want to install a specific, different version of the bundled JDBC driver, download the MySQL Enterprise Server JDBC driver (a
.jar
file) from the download website and copy the.jar
file to yourFISHEYE_INST/lib
directory (create thelib/
directory if it doesn't already exist). Move the existing JDBC.jar
file to another location (and back it up). Restart FishEye/Crucible to have it pick up the new driver.
- Create a UTF-8 Database:
CREATE DATABASE fisheye CHARACTER SET utf8 COLLATE utf8_bin;
- You will also need to set the
Server Characterset
toutf8
. This can be done by adding the following inmy.ini
for Windows ormy.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[mysqld]
:[mysqld] character-set-server=utf8
- Use the
status
command to verify database character encoding information.
First select thefisheye
database:mysql> use fisheye;
Then issue themysql> status;
command:
Screenshot: Using the MySQL Enterprise Server Status Command
- Create a user that can log in from the host that FishEye/Crucible is running on and make sure that the user has full access to the newly created database. In particular, the user should be allowed to create and drop tables, indexes and other constraints.
For instance, when FishEye/Crucible and MySQL Enterprise Server run on the same machine (accessible throughlocalhost
), issue the following commands (replacing username and password with the appropriate values):
mysql> grant all on fisheye.* to 'username'@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec)
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 via a backup restoration process. This can be done from either the FishEye/Crucible administration console, which streamlines the process, or via the command line tool which FishEye/Crucible provides.
From FishEye/Crucible's Administration
- Navigate to the
Database
page in FishEye/Crucible's Administration console
- Then click '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 as required
- Click on
Test Connection
to validate the values
Screenshot: Testing the Connection
If this fails, verify that you have the MySQL Enterprise Server JDBC driver.jar
file in the classpath (by placing the.jar
file inFISHEYE_INST/lib
). 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 Data' 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 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
From the command line
- Create a backup of the
sql
data from the FishEye/Crucible instance. Information on how to create a backup can be found at Backing Up and Restoring FishEye Data \ Backing Up and Restoring Crucible Data
- Run the following command from the
bin
directory inFISHEYE_INST
$ ./fisheyectl.sh restore --sql \ --file /path/to/backup.zip \ --dbtype mysql \ --jdbcurl jdbc:mysql://hostname/dbname \ --username crucible \ --password password
- When the import is complete, FishEye/Crucible can be started and will use MySQL