Protected by Sectigo SSL

How do I connect to MySQL with ASP?

This applies to Windows Hosting accounts only. You will need to use a DSNless connection which can be achieved by using code with the following VBscript:

set rsEvents = Server.CreateObject("ADODB.Recordset") rsEvents.ActiveConnection = "Driver={MySQL ODBC 5.1 Driver}; DATABASE=databasename;USER=username; PASSWORD=password; Server=127.0.0.1"

...or the following JScript:

var rsEvents = Server.CreateObject("ADODB.Recordset"); rsEvents.ActiveConnection = "Driver={MySQL ODBC 5.1 Driver}; DATABASE=databasename;USER=username; PASSWORD=password; Server=127.0.0.1";

  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Can I use Microsoft SQL Server Management Studio to manage my MSSQL database?

We run Microsoft SQL Server 2008 on our servers, only Microsoft SQL Server Management Studio 2008...

How can I connect to a MySQL database through .NET?

MySQL Connection Strings on a Windows hosted siteAll Windows shared servers have the...

Can I connect to a MSSQL database from my linux shared hosting account?

Yes, you can connect to MSSQL databases through PHP5 via the ms_sql extension and the ms_sqli...

I'm getting SQL errors on MySQL 5 saying it can't find a column - but it's there!

1054 - Unknown column 'a.c' in 'on clause'This can happen if you're doing something like:SELECT *...

How can I connect remotely to my MySQL database?

Once logged into your hosting control panel go to Web Tools > Remote MySQL and this will take...