Configuring a MySQL or MariaDB database for the IBM UrbanCode Deploy server
Before you install the IBM® UrbanCode® Deploy server, install MySQL or MariaDB, depending on your operating system and version. If you are evaluating IBM UrbanCode Deploy, you can install the database on the same system as the IBM UrbanCode Deploy server.
To set the database to run automatically and start the MariaDB database on a Linux system that uses
yum install -y mariadb mariadb-server
systemctl, run the following command:
systemctl enable mariadb; systemctl start mariadb
When you install IBM UrbanCode Deploy, you need the database connection information, and a user account with table-creation privileges.
- On the system that hosts the database, open MySQL or MariaDB configuration file. The location of the file depends on the operating system. On Linux, the file is named my.cnf, and many distributions put the file in the folder /etc or /etc/mysql. On Windows, the file is named my.ini.
- In the
[mysqld]section of the configuration file, add the following lines:
- Restart the database. For example, to restart MariaDB on Linux, use this
systemctl restart mariadb
Open a command-line window and log in to the database.
The command might look like the following example:
mysql -u username -ppassword
username, specify the user name for the database. The default user name is
password, specify the password for that user name. The default account has no password; in this case, omit the
-pflag and the password.Note: Do not insert a space between the
-pflag and the password.
Create a database. Specify case-sensitive collation.
The following commands are an example of how you might create this database:
CREATE USER 'dbUser'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE dbName character set utf8 collate utf8_bin;Grant all permissions to the user on the MySQL server version 7 and prior:
GRANT ALL ON dbName.* TO 'dbUser'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;Grant all permissions to the user on the MySQL server version 8:
GRANT ALL PRIVILEGES ON dbName.* TO 'dbUser'@'localhost'; GRANT ALL ON dbName.* TO 'dbUser'@'localhost';Where,
dbUseris the username for the database.
dbNameis the database name.
- Log out of the database command line.
Obtain the database JDBC driver.
The JDBC JAR file is included among the database installation files. The driver is unique to the database edition you are using.
When multiple drivers are available, you might need to consult with the database provider to determine which driver to use. The JDBC driver version that you must use might depend on the version of the database and the version of Java™ used by the IBM UrbanCode Deploy server.
- Copy the JDBC JAR file to installDir\lib\ext.
- Begin server installation. See Installing the server. When you are prompted for the database type, enter mysql.
Provide the JDBC driver class IBM UrbanCode Deploy uses to
connect to the database.
The default value is
- Next, provide the JDBC connection string.Typically, it is similar to the following code:
For example, the connection string to database that is on the same computer as the IBM UrbanCode Deploy server and that uses the default port resembles the following code:
- Finish by entering the database user name and password.