I used node js to connect mysql server and it is working good. I used the API developed in node js and used in the local macOS app. The problem is querying the data from mysql database on workbench is fast but in node js API it is very delay. So, I've to connect mysql db directly from my macOS app.