0

I have a local MYSQL db with XAMPP and a MYSQL db on my web host, i can connect to my db with php codes on my local or website.

now i want to connect to my db with Autoplay media studio using LUA language.

I use this lua code to connect my local db and it connected normally:

MySQLConnection, err = MySQL:connect("dbname", "dbuser", "dbpass", "localhost", "3306");

but when I want to connect to mysql db on my website can't connect :

MySQLConnection, err = MySQL:connect("dbname", "dbuser", "dbpass", "mywebsite.com", "3306");

Please help my how to fix it

S R R
  • 73
  • 8

1 Answers1

0

please try using this method: I have implemented with FreeSWITCH and it is working fine.

local  dbh = freeswitch.Dbh("odbc://test:root:"1234") 
assert(dbh:connected())