I got it fixed with using the right username and password in the php file. Being a newbie I was actually trying this from the command line not from a php file. I found this by accident and found it nowhere in documentation etc. thanks to all who have helped.
Gary On 12/20/02 2:21 PM, "Jennifer Goodie" <[EMAIL PROTECTED]> wrote: > Problem is not in the connecting it is in the mysql_select_db as you are > denied access to the database, not the server. Your permissions might be > off or the php might not be right. It would be helpful if you posted more > of your code. > > -----Original Message----- > From: Gary Hostetler [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 20, 2002 8:28 AM > To: [EMAIL PROTECTED] > Subject: Badly placed ()'s and also access denied > > > Being the newbie that I am I get this Badly placed ()'s when I try to > do a mysql_connect(localhost,gary,password); > > I have a php script that gives me a Access denied for user: > 'gary@localhost' to database 'CONTACT'Can't Select CONTACT1046: No Database > Selected > > When the runs. I changed the script to include my username and password. > > Thanks > Gary > > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php