For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.

Create the MySQL database tables with Ant tasks

Use Ant Tasks that are provided with MobileFirst Server installation to create the MySQL database tables.


To create the database tables in a database that already exists, see Create the database tables with Ant tasks.

If MySQL server does not have the settings that are recommended in MySQL database and user requirements, the configureDatabase Ant task displays a warning. Make sure to fulfill the requirements before you run the Ant task.

To create a database and the database tables, follow the general guidelines as described in Create the database tables with Ant tasks to edit the copy of the create-database-mysql.xml file.

The following procedure provides some extra steps that you need to do when you create the database tables with the configureDatabase Ant task.


  1. In dba element that is defined in the create-database-mysql.xml file, enter the login ID and password of a MySQL administrator. By default, the administrator is root. We can assign the values in the following properties:

    • database.mysql.admin.username
    • database.mysql.admin.password
  2. In the mysql element, add a client element for each host from which the user is allowed to connect to the database. That is, all the hosts where MobileFirst Server runs.
  3. After all the database credentials are entered in the Ant file, save it and run the databases Ant target.

Parent topic: Create the database tables with Ant tasks