For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Create the MySQL database tables manually
Use the SQL scripts that are provided in the MobileFirst Server installation to create the MySQL database tables.
Before you begin
The MySQL database must fulfill the requirement as described in MySQL database and user requirements.
As described in Set up databases, all the four MobileFirst Server components need tables. They can be created in the same schema or in different schemas. However, some constraints apply depending on how the MobileFirst Server applications are deployed to the Java™ application server. They are the similar to the topic about the possible users for MySQL as described in Database users and privileges.
- Installation with the Server Configuration Tool
- The same database is used for all components (MobileFirst Server administration service, MobileFirst Server live update service, MobileFirst Server push service, and MobileFirst runtime)
- Installation with Ant tasks
- The sample Ant files that are provided in the product distribution use the same database for all components. However, it is possible to modify the Ant files to have different database:
- The same database for the administration service and the live update service as they cannot be installed separately with Ant tasks.
- A different database for the runtime
- A different database for the push service.
- Manual installation
- It is possible to assign a different data source, and thus a different database, to each of the MobileFirst Server components.
The scripts to create the tables are as follows:
- For the administration service, in mfp_install_dir/MobileFirstServer/databases/create-mfp-admin-mysql.sql.
- For the live update service, in mfp_install_dir/MobileFirstServer/databases/create-configservice-mysql.sql.
- For the runtime component, in mfp_install_dir/MobileFirstServer/databases/create-runtime-mysql.sql.
- For the push service, in mfp_install_dir/PushService/databases/create-push-mysql.sql.
The following example creates the tables for all the applications for the same user and database. It assumes that a database and a user has been created as in 'Requirements for the databases/MySQL'
The following procedure creates the tables for all the applications for the same user (mfpuser) and database (MFPDATA). It assumes that a database and a user are already created. For more information, see MySQL database and user requirements.
Procedure
- Run a MySQL command line client with the option: -u mfpuser.
- Enter the following commands:
USE MFPDATA; SOURCE mfp_install_dir/MobileFirstServer/databases/create-mfp-admin-mysql.sql; SOURCE mfp_install_dir/MobileFirstServer/databases/create-configservice-mysql.sql; SOURCE mfp_install_dir/MobileFirstServer/databases/create-runtime-mysql.sql; SOURCE mfp_install_dir/PushService/databases/create-push-mysql.sql;
Parent topic: Create the database tables manually
Last updated: 05/22/2025 05:31:51