Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Is there a way to import MySQL database into CQ5

Avatar

Avatar
Level 1
pierrot10
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
pierrot10
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
pierrot10
Level 1

01-07-2020

Hello

I am managing a CQ5 instance of my company. My company use CQ5 and offer a web site by group, but there is a lot of limitation

Following a need of my group, I create a PHP/MySQL database. The goal is to collect measures and store is into a MySQL database. The charts are shown into a PHP web page and I am using chartjs library Charts to display the charts.

I have to import my PHP script, database, and charts into CQ5 and I am really not an expert with CQ5.

My first question is, is there a way to import a MySQL database (which contain tables (and JOIN request) into CQ5?

My second question, as my PHP script, run MySQL requests, and show the charts because of javascript library, is there a chance to import all in CQ5 to have as a result, the same display as with my PHP script? If yes, could you help me to achieve this goal ?

Many thanks for your help!!

cq5 javascript mysql php

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

125 likes

Total Posts

203 posts

Correct Reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

125 likes

Total Posts

203 posts

Correct Reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile
raj_mandalapu
MVP

01-07-2020

Based on your comments, you have lot of limitations and also you are not an expert in CQ5, so I prefer to use Iframe approach, using Iframe you can load your charts page directly on the AEM page. but you can also consider other options in case you need it.

There is no Out of the box functionality to Import SQL data directly into AEM, you need to write custom code, you need to export your table data into XML and the code which you write in CQ5 will read and import.

Another approach is, you can maintain data in MySQL, using JDBC connector , connect with MySQL, and write custom code to read table data using select statements. refer this: https://helpx.adobe.com/experience-manager/using/querying-mysql-64.html

Once you have table data then you can use chart.js to display charts in CQ5

 

 

 

Answers (1)

Answers (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,133 likes

Total Posts

3,161 posts

Correct Reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,133 likes

Total Posts

3,161 posts

Correct Reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

03-07-2020

The product is no longer called CQ5 (that renmaing happend at least 5 years ago), so you probably do have a very old version of it running.

 

Regarding your question: Storing SQL data in the AEM repository is no good idea, as it is not designed for it. If your goal is to show the charts inside an AEM page, I would agree to the approach suggested by @raj_mandalapu and use an iframe to embed the output created by your PHP script.