You need to use the maintainance mode first.
Basically you will need the following five steps to initialize your deployment in a production environment:
Start the Mendix Business Server in maintenance mode
You can configure the Mendix Business Server to start maintenance mode by adding or updating the following line in application.conf:
MaintenanceMode = true
Then start the application by starting the service (Windows) or run it as a deamon (Linux) or using the DOS box. In the deployment folder one can find a file Mx.cmd which starts the Mendix Business Server in a DOS box
Create system tables
When starting the Mendix Business Server, the first step to be taken is the creation of the system tables.
INFO - CONNECTIONBUS: Initializing ConnectionBus...
INFO - CONNECTIONBUS: Trying to create initial databaseconnection...
INFO - CONNECTIONBUS: Name: hkr_myproject; Type: JDBC data store; URL: jdbc:postgresql://postgres83/hkr_myproject; Driver: org.postgresql.Driver
Executing 37 data store commands... |
................................................................................
INFO - CONNECTIONBUS: 37 data definition commands executed on data store.
The database server now lists the following content of the database:
hkr_myproject=> \d
List of relations
Schema | Name | Type | Owner
--------+-----------------------------------------+----------+--------
public | system$actionlock | table | mendix
public | system$actionlock_id_seq | sequence | mendix
public | system$actionlock_user | table | mendix
public | system$actionlock_xasinstance | table | mendix
public | system$clustermanager | table | mendix
public | system$grantableroles | table | mendix
public | system$language | table | mendix
public | system$language_id_seq | sequence | mendix
public | system$scheduledeventinformation | table | mendix
public | system$scheduledeventinformation_id_seq | sequence | mendix
public | system$session | table | mendix
public | system$session_id_seq | sequence | mendix
public | system$session_user | table | mendix
public | system$statistics | table | mendix
public | system$statistics_id_seq | sequence | mendix
public | system$user | table | mendix
public | system$user_id_seq | sequence | mendix
public | system$user_language | table | mendix
public | system$userrole | table | mendix
public | system$userrole_id_seq | sequence | mendix
public | system$userroles | table | mendix
public | system$xasinstance | table | mendix
public | system$xasinstance_id_seq | sequence | mendix
(23 rows)
Synchronize the database with the model
Press '3' and 'Enter' to synchronize the database structure (this option is only available when the database is out of sync)
ERROR - CONNECTIONBUS: Main Datastore is out-of-sync with metamodel! (124 datastore validation queries) INFO - CONNECTIONBUS: Initializing ConnectionBus done (725 ms) INFO - CORE: Maintenance Mode active: NOT Initializing Session Manager, External Interface, Modules, Scheduled Events INFO - CORE: Mendix XML Application Server has been started in ACCEPTATION mode. INFO - CORE: XAS fully started on Tue Oct 07 20:36:12 CEST 2008 (total initialization time: 3791ms)
1: Synchronize modeler file 2: Advanced 3: About x: Shutdown
Type your choice and press <enter> to continue: 1 2008-10-07 20:36:40.861 INFO - CONNECTIONBUS: Validating data store structure...
There are 124 validation commands to execute to synchronize the database structure.
1: Show all 2: Write all to file 3: Synchronize modeler file 4: Synchronize modeler file without data store structure validation b: Back x: Shutdown
Type your choice and press <enter> to continue: 3
Executing 124 data store commands... | ................................................................................
INFO - CONNECTIONBUS: 124 data definition commands executed on data store.
Create an administrator account
In Acceptation/Production Mode creating an administrative user account can be done using the Advanced -> Create/Update Administrative User Account option listed in the console menu.
Do not use the name MxAdmin
1: Synchronize modeler file
2: Advanced
3: About
x: Shutdown
Type your choice and press <Enter> to continue: 2
1: Core
2: Connection Bus
3: Synchronize object instances
4: ExternalInterface
5: Microflow
6: Create/Update Administrative User Account
b: Back
x: Shutdown
Type your choice and press <Enter> to continue: 6
Currently there are no users with role MxAdministrator
Username: MyAdmin
Password:
Confirm password:
Resetting user account data for MyAdmin
Start the framework in normal mode
You can configure the Mendix Business Server to start in normal mode again by updating the following line:
MaintenanceMode = false