I’m trying to view the production cloud database in pgAdmin. I’m able to do this locally when creating a database configuration in App Settings. However, I see no way of viewing these settings (database username, database pw, database name, etc) in the production environment on Mendix Cloud. I know that I can download the backup but I was wondering if I can do this via some sort of connection. Thanks!
If your use case is being able to run SQL queries to truncate tables, this is absolutely possible. It can be done via the Java Core API Mendix exposes. You can utilize it by creating a Java action which has an input SQL string parameter:
Be aware that this is a tricky thing, because of two specifics of the Mendix database:
SQL querying doesn’t use delete behavior, hence doesn’t clean up the database like it should with a microflow delete activity for instance
Related to above; Be aware that all associations are tables by themselves, so you also need to keep those in sync with your other database actions.
What do you want to achieve?
Your Mendix application has its own database, which will be managed under the hood. In your app can you manage your domain models, but Mendix translates those to its own table structure. There are also a lot of extra Mendix tables, which are not visible in the modeller. In my opinion there is no need to view.