mysty Posted July 30, 2006 Share Posted July 30, 2006 From the cmd prompt, I can get into mysql using the "root" user and when I use phpmyadmin, everything seems to work OK. When I enter this in DW8, I get the something's wrong error: <?php $connect = mysql_connect ("localhost", "host", "fakepw") or die ("something's wrong"); ?> I can also enter this and get the error: <?php mysql_ping (link_id) or die ("something's wrong"); ?> I believe everything is set correctly according to phpinfo. What am I missing?My setup is using Apache2triad that usesApache 2.2.0MySQL 5.0.11PHP 5.1.2 Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 30, 2006 Share Posted July 30, 2006 Try this:[code]$connect = mysql_connect ("localhost", "host", "fakepw") or die ("Unable to connect to the database: " . mysql_error()); [/code]It should now return an erroir message from mysql this time, which should tell you why it is failing. Quote Link to comment Share on other sites More sharing options...
mysty Posted July 30, 2006 Author Share Posted July 30, 2006 Unable to connect to the database: Access denied for user 'host'@'localhost' (using password: YES)Thanks, I think I figured this out. The message above shows the user to be host when it should be root. I changed to root and got no error message, so assume it is now working. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 30, 2006 Share Posted July 30, 2006 Yeah if its not returning any errors, then it successfully connect to the MySQL server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.