How to connect Indesign with Mysql database using javascript

New Here ,
Feb 08, 2022 Feb 08, 2022

Copy link to clipboard

Copied

I am trying to connect my Indesign with MySQL and retrieve data from there.  I am writing code in javascript. I found something like this should working 

 

app.doScript("do shell script \"C:\xampp\mysql\bin\mysql\ -u 'root' -p ' ' -d mysql -e 'select * table'\"", ScriptLanguage.APPLESCRIPT_LANGUAGE);
 
1.)  how I can check if I am really connected with my db.
2.)  how I retrieve data from there (how I can store them to some variable for fuure manipulation )?
 
TOPICS
How to , Import and export , Scripting , Server developers , Sync and storage

Views

90

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 08, 2022 Feb 08, 2022

Copy link to clipboard

Copied

LATEST

Hi @Jasmin23057676xm60,

This approach might work but it will be really difficult to debug this. A more better approach would be to create a CEP extension where you can use full suite of modern JS tools and also node packages which will easily allow you to connect to the MySql DB. Then you can also connect your jsx file with the CEP extension to send query and get back the result.

-Manan

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines