There is a module in the appstore called database connector. This should be qhat you are looking for.
Do you need Mendix to run on your own (which?) database type? Or do you want to connect from Mendix to your external database, pulling in some data?
The former: this can be done in your project settings: ‘Settings’ > ‘Configurations’ > 'Type’
The latter: this can be done via the AppStore module ‘Database Connector’: https://appstore.home.mendix.com/link/app/2888/