5

To establish a connection to MySQL db using javascript , it is enough to do the following :

var conn = new ActiveXObject ("ADODB.Connection");
conn.Open("Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=blah_blah_blah;User=foo;Password=bar;");

However , ActiveXObject is defined only in IE browser .

What about the other browsers

Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254
  • 1
    that is a serious security problem and therefore not allowed in other browsers, not even in recent edge and IE browsers I think. The normal way to do that is to create a web service and access your data over REST or SOAP, exposed from that web server. – Tuncay Göncüoğlu Sep 23 '16 at 14:05

0 Answers0