[SOLVED] Access denied for user '<user>'@'localhost'
Posted by: pdavis (---.speed.planet.nl)
Date: September 13, 2009 02:33PM

Hello! I have just reinstalled WampServer after a general reformatting of my Vista computer. Added (with phpMyAdmin) my user ‘<user>’to the MySQL user table for localhost with password <password> and all privileges set to Y (I don’t remember how I did it in the previous installation). But now get “Warning: mysql_connect(): Access denied for user '<user>'@'localhost' (using password: YES)" in C:\Program Files\wamp\www\private\<filename>.php on line <linenumber> containing the command: $db=mysql_connect("localhost", "<user>", "<password>" );. No extraneous my.ini files on the system. Any suggestions?



Edited 1 time(s). Last edit at 09/13/2009 07:31PM by yfastud.

Options: ReplyQuote
Re: Access denied for user '<user>'@'localhost'
Posted by: yfastud (Moderator)
Date: September 13, 2009 03:37PM


Options: ReplyQuote
Re: Access denied for user '<user>'@'localhost'
Posted by: pdavis (---.speed.planet.nl)
Date: September 13, 2009 04:51PM

Thank you yfastud. Unfortunately config.inc.php seems to be read only (even when I try to edit it after a restart and before starting Wampserver, and the Windows "read only" flag is not set) so I cannot save the modified version.

Options: ReplyQuote
Re: Access denied for user '<user>'@'localhost'
Posted by: pdavis (---.speed.planet.nl)
Date: September 13, 2009 05:31PM

See now that the whole phpMyAdmin folder is read only (and this therefore applies for all the files within, although Windows dos not show them as beng read only). Will try turning this off

Options: ReplyQuote
Re: Access denied for user '<user>'@'localhost'
Posted by: yfastud (Moderator)
Date: September 13, 2009 05:32PM

you should not have that problem so check your firewall/antivirus or any other folder/file protection soft

anyway, copy that file to desktop, edit, and copy back

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Access denied for user '<user>'@'localhost'
Posted by: pdavis (---.speed.planet.nl)
Date: September 13, 2009 07:16PM

It turned out that the whole wamp directory was read only. I had finally to temporarily turn off User Account Control to remove this, but I could then follow your instructions with success, and my original problem is now solved. Thanks once again.

Options: ReplyQuote


Sorry, only registered users may post in this forum.