writer, web developer, designer

From the Blog

Oct
07

64bit Windows 2003 + MySQL = Pain

Posted by Shell on October 7th, 2009 at 6:58 pm

You’d think that moving from our old servers (Windows 2008) to our new servers (Windows 2003) would be pretty simple, seeing as our code is so old-school. But oh now, Microsoft don’t ship the database drivers for 64bit Windows by default. Joy.

So here’s what you have to do to get MySQL 5.1 working with classic ASP under Windows Server 2003 64bit:

e.g.:

PROVIDER=MSDASQL; DRIVER={MySQL ODBC 5.1 Driver}; SERVER=myserver; DATABASE=mydatabase; USER=mydbuser; PASSWORD=mydbpass; OPTION=3;

You should now be good to go. If you googled and saw posts about getting IIS to run in 32bit mode as a solution… don’t. It’s a world of pain, and when we tried it made our server really unstable.

Leave a Reply

One Response to 64bit Windows 2003 + MySQL = Pain

  1.  

    |

  2. Example code:

    < %
    sql = "SELECT * FROM mytable"

    set conn = server.createobject("adodb.connection")
    set data = server.createobject("adodb.recordset")

    conn.open "PROVIDER=MSDASQL; DRIVER={MySQL ODBC 5.1 Driver}; SERVER=myserver; DATABASE=mydatabase; USER=mydbuser; PASSWORD=mydbpass; OPTION=3;"
    data.open sql, conn

    do while not data.eof
    'do stuff
    loop
    %>