0

Need your support and assistance. Problem: host provider does not support Node.JS (only buying another hosting plan which I don`t want to do). I am using: React App (Javascript), also packages 'mysql' and 'express' and unfortunately low knowledge of PHP language (time question). I am familiar how to connect using Node.JS (at very basic level).

Question (I guess simple question): Is it possible to connect mySQL data base located on hosting which does not support Node.js by using Java Script (React App)? And how to use retrieved data from mySQL?

Thank you so much.

  • does your hosting provider support PHP? [See this then](https://www.cloudways.com/blog/connect-mysql-with-php/) – Sumit Wadhwa Dec 10 '20 at 13:19
  • Do you intend to rewrite your nodejs backed program in php? Most cheap hosting providers offer that. Do you intend to run your nodejs program on one host and your MySql server on your current hosting provider? Ask your provider how to access your MySql server from outside their internal network. – O. Jones Dec 10 '20 at 13:21
  • Yes, this host supports PHP for sure but does exist a way to use in all React project let say PHP config file (like a bridge between App and data base)? Just imagined that – Jānis Drēģeris Dec 10 '20 at 13:39
  • Writing all of your backend written on nodejs to PHP would be a tedious task. If you have only started and does not have a backend(full-fledged one) yet, you can try migrating to php. If you have already built an app, migrating to a new hosting provider who supports node js woul be your best bet. – Mohamed Mufeed Dec 10 '20 at 14:24
  • Thanks. At the moment no big projects started yet. I `ve got some useful info here: https://stackoverflow.com/questions/49674187/how-do-i-connect-javascript-and-mysql-via-php – Jānis Drēģeris Dec 10 '20 at 15:00
  • hope that will work out – Jānis Drēģeris Dec 10 '20 at 15:00

0 Answers0