Embed presentation
Download to read offline






![Finally we can create the query that get the results printing them on the console
with the logger component:
[[db_test].HTTP_Listener_Configuration.worker.0
1]
org.mule.api.processor.LoggerMessageProcessor:
[{surname=Smith, profession=programmer,
iduser=1, name=Dan}, {surname=Khedira,
profession=football player, iduser=2,
name=Sami}, {surname=Simel, profession=actor,
iduser=3, name=Rob}] Enjoy with the MULE!](https://image.slidesharecdn.com/muleesbdb1-160830192016/85/Mule-esb-db_1-7-320.jpg)
This document provides steps to connect a Mule ESB flow to a MySQL database: 1) Create a database called "mule_test" and a table called "User" in a MySQL instance. 2) Populate the "User" table with sample data. 3) Create a Mule project with a flow called "db_testFlow" that contains a HTTP listener endpoint. 4) Add the MySQL JDBC driver and configure the database connector. 5) Create a database query in the flow to retrieve data from the "User" table and log the results.






![Finally we can create the query that get the results printing them on the console
with the logger component:
[[db_test].HTTP_Listener_Configuration.worker.0
1]
org.mule.api.processor.LoggerMessageProcessor:
[{surname=Smith, profession=programmer,
iduser=1, name=Dan}, {surname=Khedira,
profession=football player, iduser=2,
name=Sami}, {surname=Simel, profession=actor,
iduser=3, name=Rob}] Enjoy with the MULE!](https://image.slidesharecdn.com/muleesbdb1-160830192016/85/Mule-esb-db_1-7-320.jpg)