Connect Mendix with MySQL

0
Hi all! I want to make an application in Mendix Studio Pro that is connected to a MySQL database. I want to display the data in Mendix widgets and be able to modify it and insert new data in the MySQL database through Mendix. I want to use templateGrid, reference selector, etc ... The database is very simple, it consists of several tables associated with a main table. My question is how should I do it? I have connected Mendix with MySQL through the JDBC DataBaseConnector and created MySQL tables in Domain Model twice: persistent and non-persistent.     And I have created a microflow composed of several microflows to load all the data of all the entities through the DataBaseConnector as explained in this video: Become a Rapid Developer Mendix Studio Pro With External Database(SQL Server) Tutorial Part2 Am I doing the right thing? Is there another way to connect Mendix to an external database and save changes and inserts to the database from Mendix? I have an application that does this in Microsoft Access and I want to switch to Mendix if possible. Thank you! PS: In the learning classes I did not find the solution to this question
asked
6 answers
1

Are you trying to use MySQL as the underlying DB for the Mendix App, or connect to it and read/write data? I ask because the widgets you are describing are built using the domain model of your Mendix app and will translate the XPath into SQL statements for whichever DB you setup.

If you just want to use MySQL as the underlying app db, just set it up in the Project Settings and then you can just build like normal.

If you are trying to read/write to and from a separate db then you are doing the correct thing with the DB connector but you aren’t going to get the widgets to automatically insert/update records into that secondary db. You’ll have to pull the data through SQL queries into your app and sit the widget on top of that table, and then write those changes back into the source tables with your SQL and db connector. I hope I’m answering and understanding the questions here.

answered
0

Ok, but once you have added the MySQL configuration to the project what should I do to read / write to the database through Mendix. What should I do to display the data in a templateGrid and be able to modify and save the changes in the database? I want to do the same thing that I do in my Microsoft Access app to do it in Mendix to be able to definitely work with Mendix

answered
0

For you to understand me better, my application is an internal application for my company to put invoices in the system. It is a simple application, until now it was done with Access, it consists of a data input / output form connected to MySQL. Well, I want to do the same with Mendix. Is this possible?

answered
0

This is my application in Access that is connected with MySQL database. I want to do the same with Mendix. How should I do it? With Microflows that get the data through DatabaseConnector and query? Or through adding a configuration to the project? Or as? It is a simple application but I don't know how to do it in Mendix? I need to figure this out to stick with Mendix or not. Thank you!

answered
0

Synchronizing Mendix with running MySQL creates these files in the MySQL database:

What is the correct option? How should I do it?

answered
0

It is that I want to work with Mendix and MySQL without changing anything of the MySQL structure. Because MySQL in turn is connected to another application. I just want to read / write in MySQL through Mendix. I ask for help with this. I don't know how to use Mendix in this case.

answered