Configuring a MySQL database

You can use MySQL as a supporting database with IBM® UrbanCode™ Release server. Create the database before you install IBM UrbanCode Release. Typically the database is installed on a computer other than the one where the server is located.

When you install IBM UrbanCode Release, you need the database connection information and the JDBC JAR file. The user account for the database must have table creation privileges.

The IBM UrbanCode Release database consists of approximately fifty tables. While storage requirements vary by installation, database storage of 10-20 GB is sufficient for most installations. The MySQL documentation provides several utilities that you can use to determine storage usage. If you are migrating to MySQL Cluster, you can use the Perl utility script, ndb_size.pl to determine storage requirements. The script connects to a non-cluster database and determines the amount of space the database requires if it used the NDB storage engine. For information about ndb_size.pl, see the MySQL documentation.

To configure the MySQL database complete the following procedure:

  1. Log in to the MySQL command line.
    The command might look like the following example:
    mysql -u username -ppassword
    For username, specify the user name for MySQL. The default user name is root. For password, specify the password for that user name. The default account has no password; in this case, omit the -p flag and the password. There is no space between the -p flag and the password.
  2. Create a user that is named ibm_ucr.
    CREATE USER 'ibm_ucr'@'localhost' IDENTIFIED BY 'password';
  3. Create a database named ibm_ucr.
    CREATE DATABASE ibm_ucr;

    This command creates a database that uses the MySQL server's default character set and collation. Unless you changed the default values for the MySQL server, the default values are CHARACTER SET = latin1 and COLLATE = latin1_swedish_ci. The current values for these variables can be found in the character-set-server and collation-server MySQL configuration variables.

    If you do not want to use the default settings, use a command similar to this example:

    CREATE DATABASE ibm_ucr CHARACTER SET = utf8 COLLATE = latin1_swedish_ci;
    Note: IBM UrbanCode Release does not support supplemental characters that require 4 bytes to store. For information about 4-byte characters, see the MySQL Unicode Character Sets topic.
  4. Grant the user that you created all privileges on the database.
    GRANT ALL ON ibm_ucr.* TO 'ibm_ucr'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
  5. Obtain the MySQL JDBC driver JAR file for the edition of MySQL that you are using. This file must be available when you install IBM UrbanCode Release.
  6. Record the values of the database parameters so that you can supply them when you install the server. The following parameters are typical for an installation of MySQL used to support IBM UrbanCode Release:
    Parameter Value
    Database user name ibm_ucr
    Database password user_account_password
    Database driver class com.mysql.jdbc.Driver
    Database connection string jdbc:mysql://database_server:3306/ibm_ucr