TeamCity On-Premises 2024.03 Help

Configuring UTF8 Character Set for MySQL

To create a MySQL database which uses the UTF-8 character set:

  1. Create a new database:

    create database <database_name> character set utf8mb4 collate utf8mb4_bin
  2. Open <TeamCity Data Directory>/config/database.properties and add the characterEncoding property:

    connectionProperties.characterEncoding=UTF-8

To change the character set of an existing MySQL database to UTF-8:

  1. Shut down the TeamCity server.

  2. From the <TeamCity Home>/bin directory, export the database using the maintainDB tool:

    maintainDB backup -D -F database_backup

    More details on the backup procedure are here.

  3. Create a new database with UTF-8 as the default character set, as described in Step 1.

  4. Modify the <TeamCity Data Directory>/config/database.properties file by changing the connectionUrl property to:

    jdbc:mysql://<host>/<new_database_name>
  5. Import data to the new database:

    maintainDB restore -D -F database_backup -T <TeamCity Data Directory>/config/database.properties
  6. Start the TeamCity server.

Last modified: 27 March 2024