I also had some issues running Mendix on an external database. I got mine to work with MySQL (this was our preferred database of choice). I have a mysql database running locally (important to note Mendix 7.23.7 and down only supports MySQL 5.7 and 7.23.7 and up (8.0.0) support MySQL 5.7 and 8.
Create an empty schema.
In mendix studio pro, open your project settings and go to the ‘Configuration’ tab and click on new. Add one like below:
Name: <unique name> // any config name you want
Type: MySQL/Maria DB // database type
URL: localhost:3306 // if you have a local instance of mysql running, you can use localhost or 127.0.0.1
Database name: <database name> // database name
Username: <user> // create this user with their privileges beforehand
Password: <user password> // password for above user
Step 3 <optional>:
If you want your data from your build-in database carried over to the external one you need to add the following options in the ‘Custom’ tab in the ‘Configuration’ window:
SourceDatabaseName: default // database you want to copy the data from
SourceDatabasePassword: // password for the database, the built-in one does not use a password
SourceDatabaseType: HSQLDB // build-in database uses HSQLDB
SourceDatabaseUserName: SA // don’t know if all build-in databases uses the same one, but you can open your build-in one in mendix and check
Make sure that your MySQL instance is always running before you run your app and make sure to set the new database as the ‘Active’ configuration. Now, run your project locally. Your data will be copied over to your external database (might take some time). After your first startup, it is best practice to remove all the settings under the ‘Custom’ tab.
Hope this helps! You can message me if you need help.
Privileges looks like this:
‘admin’ user’s privileges.
Constants and Customs tab contains no settings.