password change causes error 1045
Posted by: richlather (---.sip.int.bellsouth.net)
Date: February 17, 2009 04:06PM

Hello-
I am a beginner with MySQL and hope someone can help me with an access problem. I created my first database related site and hoped to upload it when I encountered a problem. I do all entries and adjustments thru the phpmyadmin panel since it's the easiest way for me to do it. It promted me to set a password which up to this point I had not done. Security being paramount, I went to "databases", clicked on "edit privileges", and added the password to my account.

Now I cannot open the phpmyadmin at all. When I click on my tray icon I don't even get a prompt asking for a password, I just get an error message saying "#1045 - ACCESS DENIED FOR USER 'root'@'localhost' (using password:NO).

How do I fix this? Can I do this thru the MySQL Console? If so, what do I type in? If not, is it easier to uninstall Wampserver2 and then reinstall?

Thanks.

Options: ReplyQuote
Re: password change causes error 1045
Posted by: yfastud (Moderator)
Date: February 17, 2009 04:40PM

to setup password, follow this and skip steps already done
[blog.jlbn.net]

Have fun,

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

Options: ReplyQuote
Re: password change causes error 1045
Posted by: richlather (---.sip.int.bellsouth.net)
Date: February 17, 2009 04:53PM

Thank You for the input however I cannot access phpmyadmin to follow these steps. That is the main problem. As such, I do not have the ability to make any pasword changes this way. Simply put, when I select phpmyadmin from the tray I got the following message : #1045 ACCESS DENIED FOR USER 'root'@'localhost'(using password:NO).

Accessing phpmyadmin is not possible due to the password change I initiated last time. Is there any other way to change back or remove the password for phpmyadmin? If not, then I assume I need to uninstall in which case I could use some instructions for that procedure.

Thanks again.

Options: ReplyQuote
Re: password change causes error 1045
Posted by: yfastud (Moderator)
Date: February 17, 2009 05:13PM


Options: ReplyQuote
Re: password change causes error 1045
Posted by: yawasare (---.cpe.net.cable.rogers.com)
Date: February 17, 2009 05:24PM

C:\wamp\apps\phpmyadmin3.1.1/config.inc.php
open that file and edit it put in your password down there and username
u will be good

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'http';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'username here';
$cfg['Servers'][$i]['password'] = 'password here';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;

YAW ASARE

Options: ReplyQuote
Re: password change causes error 1045
Posted by: yfastud (Moderator)
Date: February 17, 2009 06:26PM

it's NOT recommended to hard code password in config file :-(

Have fun,

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

Options: ReplyQuote
Re: password change causes error 1045
Posted by: richlather (---.sip.int.bellsouth.net)
Date: February 17, 2009 07:01PM

Hi-
I tried following instructions from step 6 as prescribed. Still no luck. After rebooting I attempted to enter the phpmyadmin thru the tray icon and was greeted with the same response as before: #1045 ACCESS DENIED FOR USER 'root'@'localhost' (using password:NO)

Never was I greeted with a screen or prompt asking for a password, just the access denied screen. I'm beginning to think I'm better off uninstalling and reinstalling. Is there any harm to this? Can an uninstall be done simply thru the MySQL>remove service dropdown? If so, will there be any residual logs or anything to contend with when reinstalling?

Thanks.

Options: ReplyQuote
Re: password change causes error 1045
Posted by: yawasare (---.cpe.net.cable.rogers.com)
Date: February 17, 2009 07:07PM

i dont think so
but did you put user nanme pass word?

YAW ASARE

Options: ReplyQuote
Re: password change causes error 1045
Posted by: richlather (---.sip.int.bellsouth.net)
Date: February 17, 2009 07:18PM

Here's what the entire file reads:

<?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 3.1.1 setup script by Piotr Przybylski <piotrprz@gmail.com>
* Date: Tue, 16 Dec 2008 09:58:49 +0100
*/

$cfg['blowfish_secret'] = 'mypassword';

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;

/* End of servers configuration */

$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>

Have I done what I was supposed to?
Thanks.

Options: ReplyQuote
Re: password change causes error 1045
Posted by: yawasare (---.cpe.net.cable.rogers.com)
Date: February 17, 2009 07:21PM

ok put the password you used in here
$cfg['Servers'][$i]['password'] = 'PUT THE PASSWORD YOU ENTER WHEN CHANGING THE PASSWORD HERE';

YAW ASARE

Options: ReplyQuote
Re: password change causes error 1045
Posted by: yfastud (Moderator)
Date: February 17, 2009 07:46PM

don't reisntall, but download resetmysql here
[downloads.jlbn.net]

to setup password, follow this
[blog.jlbn.net]

Have fun,

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

Options: ReplyQuote
Re: password change causes error 1045
Posted by: richlather (---.sip.int.bellsouth.net)
Date: February 17, 2009 07:49PM

Thanks but it didn't work. Here's the full and complete message when I try to start up the phpmyadmin:

MySQL said:

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.


Is there a way to get the config file back to it's original state before I input any password at all? The last time I was able to get into the program was before I had set a password.

Thanks

Options: ReplyQuote
Re: password change causes error 1045
Posted by: richlather (---.sip.int.bellsouth.net)
Date: February 17, 2009 07:50PM

I'll try the downlodd you just suggested.
Thanks.

Options: ReplyQuote
Re: password change causes error 1045
Posted by: richlather (---.sip.int.bellsouth.net)
Date: February 17, 2009 08:04PM

I made the changes and got a different error but still no access. The error code read:


MySQL said:

#1045 - Access denied for user 'root'@'localhost' (using password: YES)


Do I need to return the config.inc.php file back to it's original start before teh changes suggested above?

Options: ReplyQuote
Re: password change causes error 1045
Posted by: showstopper (---.rev.greendottt.net)
Date: February 17, 2009 08:12PM

did you change the line
$cfg['Servers'][$i]['auth_type'] = 'config';
to
$cfg['Servers'][$i]['auth_type'] = 'cookie';

and added this line
$cfg['blowfish'] = 'any phase can go here';

then restart your server

Options: ReplyQuote
Re: password change causes error 1045
Posted by: yfastud (Moderator)
Date: February 17, 2009 08:43PM

Quote

Do I need to return the config.inc.php file back to it's original start before teh changes suggested above?
yes ;-)

Have fun,

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

Options: ReplyQuote
Re: password change causes error 1045
Posted by: richlather (---.sip.int.bellsouth.net)
Date: February 17, 2009 10:22PM

Thanks for all the suggestions however I still have no access. I tried returning config.inc.php to it's originals state only to get the same error. Then I tried the suggestion of adding the two addition provisions above and still got the exact same error code. The config.inc.php file currently reads:

<?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 3.1.1 setup script by Piotr Przybylski <piotrprz@gmail.com>
* Date: Tue, 16 Dec 2008 09:58:49 +0100
*/

$cfg['blowfish'] = 'my password';

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'my password';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;

/* End of servers configuration */

$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>


I'm just aobut ready to quit and try reinstalling. Anyone got one last idea?
Thanks to everyone who has tried to help with this so far.

Options: ReplyQuote
Re: password change causes error 1045
Posted by: yfastud (Moderator)
Date: February 18, 2009 01:36AM

here steps you should do
1. search and delete any my.ini file outside wamp folder
2. reverse config.inc.php to its original

$cfg['blowfish'] = '';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['password'] = '';

3. download resetmysql here
[downloads.jlbn.net]
4. clear your browser cache
5. restart wamp
6. to setup password, follow this
[blog.jlbn.net]

Have fun,

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

Options: ReplyQuote


Sorry, only registered users may post in this forum.