I might have missed the first of your posts and may be repeating someone else's suggestions but have you checked the hosts that the mysql user account that your are using can connect from the right areas. In the user table of the mysql database insure that the user account you are using has the proper rights to connect from 'localhost' and depending on your setup, that user may need access to connect from 'localhost.localdomain'. You could test if this may be the problem by giving that user account the value of '%' in the host column which would allow the user to connect from all hosts but do not leave it this way as you will be wide open for intrusion.
BJH -----Original Message----- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 8:27 PM To: Bryan McLemore; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: mysql_connect On 3 Sep 2002 at 23:00, Bryan McLemore wrote: > ----- Original Message ----- > From: "David Robley" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 03, 2002 9:31 PM > Subject: [PHP-DB] Re: mysql_connect > > > > In article <000c01c253b2$506d7530$0101a8c0@fwcmain>, > > [EMAIL PROTECTED] says... > > > I'm trying to connect using the sample code in the php > > > documentation. > IT however dies every time. If someone could please help me? Thanks. > > > > > > Bryan > > > Can you show the code you are using, and any error > messages you get? > > -- > David Robley > Temporary Kiwi! > > Quod > subigo farinam > > -- > PHP Database Mailing List > (http://www.php.net/) > To unsubscribe, visit: > http://www.php.net/unsub.php > Love the formatting by your mail pkg - OE of course :-) > The code is > > $link = mysql_connect("localhost:3306", "UserName", "Password") > or die("Could not connect"); > > Thanks, > Bryan McLemore May I suggest you keep the discussion on the mailing list - a) you have the entire list's expertise to draw on, b) the solution is shared with others who may benefit and c) you may get a quicker answer. Now, you haven't said so, but I assume you are getting 'Could not connect'? So, points to check: 1) mysql is running, and on port 3306; note that you don't need to specify the port usually 2) the username and password are correct - try the command line version to check that the user/pass are accepted (assuming you have command line access) 3) remove the 'or die' construct and see if you get an error message -- David Robley Temporary Kiwi! Quod subigo farinam "My grape juice has fermented," Tom whined. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php