How to Integrate Data between AEM forms & MySQL?
To integrate data between AEM Forms and MySQL, you can follow these steps:
- Step 1:-
- Download MySQL in your local environment with the help of this URL(dev.mysql.com/download).
- Install the MySQL (during installation we have to configure root user in MySQL as well as the new user & root password).
- Step 2:-
- After installation you will find workbench where we can create new schema.
- Step 3:-
- With the help of this URL(dev.mysql.com/download).
- click on connector/j.(MySQL connector jar file) downloaded.
- Step 4:-
- Open the System Console (for eg: localhost:4504/System/console/bundles)
- than install here the downloaded jar file.
- Note:- Make sure that installed jar file is in active mode.
- Step 5:-
- After installed jar file.
- Go to Configuration Manager (for eg: localhost:4504/System/console/configMgr).
- Here search datasource.
- Go to Apache sling connection pooled data source and expand this and configure that data source.
- Step 6:-
- Data source name(*):-Whatever you provide data here that name will be available in databaseformdatamodel.
- Data Source Service Property Name:- datasource.name(By default it is present).
- JDBC driver class :- com.mysql.cj.jdbc.Driver.
- JDBC connection URI:-jdbc:mysql://localhost:3306/firstaemforms
- username:-root
- password:-you will give those password when we given when we install MySQL in local environment.
- After that save the configuration.
Note:- make sure that configuration is saved- And here we can see that databaseformdatamodel created.
- After created go to Edit mode databaseformdatamodel database is present.
- After that your form data modal are created
- If I extend the databaseformdatamodel, we can see that our created database(selfdatabases).
Note:- If you found any warning icon it means AEM Forms is not connected to MySQL.
Thanks
Matri Sharma