|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
connecting a mySQL db via ASP
Hey Guys,
I'm having trouble making the connection to my mySQL db within an ASP page. Is there a good resource I can go to for some help? Thanks. |
|
#2
|
||||
|
||||
|
Please search the forums before posting - this question has been answered many times here.
|
|
#3
|
|||
|
|||
|
My main question is (which I didn't find an answer for) is:
If I am running my ASP pages on my Windows server, and I want to access the mySQL db, which is on a separate Linux server, how do I do that? Can I reference it via a mapped network drive? A direct drive letter? The actual name and path to the linux server? I have no idea what to do here. Any help would be greatly appreciated. Thanks. |
|
#4
|
|||
|
|||
|
StrIP=Request.ServerVariables("SERVER_NAME")
MyServerDataBase="db_myDatabase;" dbUser="uid=myUserName;" dbPassword="pwd=MyPassword;" strForConnection_GL = "DRIVER={mySQL};" & _ "Server=" & StrIP & _ ";Port=3306;" & _ "Option=131072;" & _ "Stmt=;" & _ "Database=" & MyServerDataBase & _ ";Uid=root;" & _ "Pwd=;" DbDSN=strForConnection_GL set conn = server.CreateObject("ADODB.Connection") set rs = server.CreateObject("ADODB.Recordset") conn.Open DBDSN rs.ActiveConnection = conn if conn.errors.count <> 0 then response.write "Error!" end if |
|
#5
|
|||
|
|||
|
Can I reference it via a mapped network drive? NO
A direct drive letter? NO The actual name and path to the linux server? No Answer: Just use IP address of the Linux Server |
|
#6
|
|||
|
|||
|
"Data source name not found and no default driver specified"
Do I need to specify something else? Thanks. |
|
#7
|
|||
|
|||
|
|
|
#8
|
|||
|
|||
|
I did install the driver. I actually uninstalled it and reinstalled it to make sure ..
|
|
#9
|
|||
|
|||
|
So I still cannot connect via a connection string or DSN. I *can* connect to it via "testing data source" in IIS. I can also connect to the db via SQLyog (gui interface for the db). Still unable to connect via an ASP page though.
So my ODBC driver is installed correctly, right? What else am I missing? |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > connecting a mySQL db via ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|