Problema de conexión de MySQL 5.6.14 de 64 bits en Windows 8.1 Pro de 64 bits

I am trying to connect my classic ASP website to the MySQL database. I am using the following:

1. OS: Windows 8.1 Pro 64 bit
2. DB: MySQL 5.6.14 64 bit
3. ODBC Driver: MySQL ODBC 5.2 ANSI Driver
4. IIS: IIS 8

Here is what I have done till now.

I have downloaded the MySQL 5.6.14 64 bit database from MySQL website and installed it successfully. The database is working perfectly as I am able to create tables, stored procedures etc.

Next I created a folder (mira_dev) inside the wwwroot folder and wrote 3 classic asp pages. The first one is the login.asp page, the second one is the checklogin.asp page and the last one being the index.asp page.

Now I am able to see "It works!" in my browser.

I next created a System DSN in the ODBC Data Source Administrator (64-bit). I named it as MySQL 64 Bit, TCP/IP Server as, Port as 3306, then username as root and password as root. I tested the connection and it says "Connection successful".

The connection string that I am using is:

strconnect = ("Driver={MySQL ODBC 5.2 ANSI Driver};Server=localhost; Port:4040;Database=mira_dev;User=root;Password=root;Option=4;")

I next typed in the path to my login page on my browser and the login page came up alright.

I typed in the username and password as expected and hit Enter. The expected result is, after I hit enter it should authenticate me via the invisible page checklogin and then if it matches with the database, it should pass me to index.asp.

Now here is the catch. If I do this in Chrome/Firefox, it takes me to index.asp but instead of showing the correct contents it displays the error message: "An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error." The "click here" takes me to a page which tells me how to configure classic asp with mysql. I have done all that and I think I am on the correct path but missing something very silly.

But if I do the same steps in IE 11, then it stops me at checklogin.asp and tells me there is a server error. I am sure the logic in checklogin for authentication is fine as it works in my other computer but I am not sure what I am missing.

It would be of great help if you guys help me out. Thanks a lot in advance! :)

preguntado el 27 de noviembre de 13 a las 00:11

1 Respuestas

1) Why are you using port 4040 rather than (the default) port 3306 in your connection string? Especially when you are using 3306 in your named ODBC datasource. This looks the most likely reason for your server errors

2 )You could also try replacing "Server=localhost" with "Server=". Either should work on a standard Windows box, but you know the parameters from your DSN connection work, so copy them

3 )Also try "Driver={MySQL ODBC 5.2w Driver}" - see this page

NB IE has always given you its own error messages unless you disable that feature

respondido 27 nov., 13:01

Thank you for your suggestions. I have tried all 3 of them but it is still not working. I even tried the 32 bit driver but with no success. Now my 64 bit connection string reads as follows: strconnect = ("Driver={MySQL ODBC 5.2w Driver};Server=;Port:3306;Database=mira_dev;User=root;Password=root;Option=4;") I tried with "Option=3" as well as suggested by the website but that did not help either. I have also disabled the script debugging per your advice. Please advise what else I can do to get this working. I really appreciate your time and help. - código activado

The only other suggestion I can offer it to for use the DSN you created through ODBC Administrator in your connection string: strconnect = "MySQL 64 Bit". Also, if you're using the 32 bit driver did you enable 32 bit applications in your app pool. As far as I can tell that setting is "either or" - enabling 32 bit drivers seems to disable 64 bit drivers. - Juan

You might find this page useful - It tells you how to configure IIS to get detailed error messages rather than just 500 Internal Server Error: - Juan

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.