Connect with MySQL DB through MuleSoft

 

We can connect with MySQL DB through MuleSoft by adding the dependent jar and providing the connection details

Create a project in Anypoint Studio

Connect with MySQL DB through MuleSoft

 

Drag and Drop database activity in a flow

Connect with MySQL DB through MuleSoft

 

Click on the Connector Configuration Add button and select the MySQL option from the connection drop down

Connect with MySQL DB through MuleSoft

 

Now Click on Required Libraries Configure and select Add Maven dependency

Connect with MySQL DB through MuleSoft

 

Copy the dependency from – select the version as per your installed MySQL

https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.22

 

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.22</version>
</dependency>

 

Click Finish

 

The dependency will be installed in the project

 

Provide the details

 

Click Test Connection

 

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Scott Beeker
Scott Beeker
1 year ago

Thanks for the hoot? I am still stuck. I am seeing an access denied in the log on the mulesoft. The most recent attempt is with the I guess encrypted password install of mysql. The instal kind of forces it. So, I am trying to get the mysql example working from the mulesott examples. The video about configuring database is missing. Anyways, when I run the example code that effectively does a query by last name returning first name it fails getting connection. I did a grant all on the company database for the user. Kind of funny that the… Read more »