| |||||||||||
cannot connect to the db via an ASP page Posted by etc (etc), 6 June 2003 I have downloaded MySQL ODBC's driver Version 3.51I have a mySQL db setup, which can be connected to through IIS (testing the data source through a DSN). I can also connect to the db through SQLyog (GUI interface for the mySQL db). However, I cannot connect to the db via an ASP page. I've tried numerous connection strings, along with trying to connect with a DSN - all unsuccessfully. The ASP pages reside on a Win2k box and the db is on a linux box. The fact that I can connect to it shows that I *should* be able to hit the db from within the ASP page. Any help would be appreciated. Posted by admin (Graham Ellis), 7 June 2003 Looks like it may be more of an ASP rather than MySQL problem, and ASP isn't quite one of my "things". However - do post up some of the connect strings for the various ways of connecting (changing any passwords of course) and I'll have a look and see if I can suggest anythingPosted by etc (etc), 9 June 2003 these are some of the connect strings we have tried.'this is the simplest way to make the connection and it *should* work rather easily 'adoConn.Open "DSN=employees.frm.dsn" ' from damian 'adoConn.Open "driver={mysql}; database=company_phone_listing;server=192.168.1.3;uid=xx;pwd=xx;option=1 6386;" ' oledb provider for mySQL 'adoConn.Open "Provider=MySQLProv;" & _ ' "Data Source=company_phone_listing;" & _ ' "User Id=xx;" & _ ' "Password=xx" ' from able consulting 'adoConn.Open "Driver={mySQL};" & _ ' "Server=192.168.1.3;" & _ ' "Port=3306;" & _ ' "Option=131072;" & _ ' "Stmt=;" & _ ' "Database=company_phone_listing;" & _ ' "Uid=xx;" & _ ' "Pwd=xx" ' from connectionstrings.com 'adoConn.Open "Driver={mySQL};Server=192.168.1.3;Port=3306;Option=131072;Stmt=atabas e=company_phone_listing;Uid=xx;Pwd=xx;" Posted by admin (Graham Ellis), 10 June 2003 Hmm. Have you tried looking at error statuses returned / messages to see what the ASP thinks has gone wrong?A silly thought - are you running the MySQL GUI on the same computer that's running IIS? MySQL authorises users from a specific host (it's not *just* name and passowrd login), and one of the very common connection errors is where a MySQL login is set up for only localhost ... works fine in testing, fails as soon as someone tries to connect with a remote client. This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |