If you want to integrate with an existing external database, you can use the Database Replication module to map this data to your Mendix application.
There are two ways to connect to an external database in our Mendix App.
i) In Mendix Studio pro we have an option called Configuration in App setting, Where you are able to give external database configuration details by creating a new configuration.
ii) You can use the Database Connector module: this connector provides microflow actions to execute SQL queries on any database which supports JDBC connectivity.
The steps were explained clearly here https://forum.mendix.com/link/questions/92431
Hope this helps!