Pages: 12Next
Current Page: 1 of 2
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: pam_w (---.dynamic.dsl.as9105.com)
Date: January 03, 2008 06:24PM

Hello,

I have installed and used WAMP with no problems so far. I used phpmyadmin to create a database and I added data. I thought I should include a password for the root user so I did this, using phpmyadmin again.

I then logged off my pc and when I try and access phpmyadmin now, I get this error

MySQL said:

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

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

I have spent the day reading through information on Google but nothing works, I also read through the documentation which is included with phpmyadmin. I created a new config.inc.php file, this made no difference. I then thought if I uninstalled and re-installed WAMP this would solve the problem, but no luck.

Any help would be great, bear with me though as I'm pretty new to all this! Learnt loads today though, lol!

Pam

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: yfastud (Moderator)
Date: January 03, 2008 07:34PM

Since my websites still in updating progress, , you can check google cache here for proper password setup

[209.85.207.104]

but remember those guides are for older wamp versions, so some of them might work w/ correct paths associated w/ wamp2

Have fun,

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

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: srnowlin (---.keytechcommunication.com)
Date: January 03, 2008 07:53PM

Pam,

Does the following entries resemble your config.inc.php?

all I did was change my authentication and then set the nopassword to false.

I can access myphpadmin locally.

For me, I'm trying to make myphpadmin available through the web so I can remotely administer a database with a designated user.


regards,
Sandra


--Edit: I also added the blowfish_secret phrase so I could use cookie authentication.
____

$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
// with 'config' auth_type)
$cfg['Servers'][$i]['SignonSession'] = ''; // Session to use for 'signon' auth method
$cfg['Servers'][$i]['SignonURL'] = ''; // URL where to redirect user to login for 'signon' auth method
$cfg['Servers'][$i]['LogoutURL'] = ''; // URL where to redirect user after logout
$cfg['Servers'][$i]['nopassword'] = FALSE; // Whether to try to connect without password
$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only

----



Edited 1 time(s). Last edit at 01/03/2008 07:58PM by srnowlin.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: yfastud (Moderator)
Date: January 03, 2008 08:10PM

Actually, you need to edit the third line in config.inc.php

$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed

To become:

$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'same_password_put_in_phpmyadmin'; // MySQL password (only needed

Then save the file and restart wamp to take effect

Have fun,

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



Edited 2 time(s). Last edit at 01/03/2008 08:13PM by yfastud.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: srnowlin (---.keytechcommunication.com)
Date: January 03, 2008 08:13PM

why do you have to do that?

I don't have the password hardcoded into my config.inc.php and it works fine.

I'm just curious why mine is working this way and hers is not.


---Edit

I know that with config as my authentication and not cookie...I have to hard code the password or use root with no password. Is this why?



Edited 1 time(s). Last edit at 01/03/2008 08:14PM by srnowlin.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: yfastud (Moderator)
Date: January 03, 2008 08:16PM

Because you didn't setup password in phpmyadmin but she did, so she need to setup that same password in config.inc.php so phpmyadmin can access mysql

Have fun,

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

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: yfastud (Moderator)
Date: January 03, 2008 08:22PM

Quote

---Edit

I know that with config as my authentication and not cookie...I have to hard code the password or use root with no password. Is this why?
There are too many ways to setup password, and different people use different ways, so my suggestion here is just to solve her current problem instead to instruct longer details

Have fun,

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



Edited 1 time(s). Last edit at 01/03/2008 08:26PM by yfastud.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: srnowlin (---.keytechcommunication.com)
Date: January 03, 2008 08:25PM

I DID set up a password for my configuration and MY configuration works, thats why I sought to help her, especially since your links are down and you keep referring people to old cache files.


I'm guessing you are the only one qualified to give advice or to help.

My apologies Pam.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: jw_k (---.net-you.de)
Date: January 03, 2008 08:27PM

you have that file in phpmyadmin/ and not in any subfolder?

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: yfastud (Moderator)
Date: January 03, 2008 08:29PM

Quote

I'm guessing you are the only one qualified to give advice or to help.
Nope, any1 can help another, and as mentioned, different people use different ways, so if you like her to use your ways, you should provide more details to do that since I know that way too and it seems missing some steps

Have fun,

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

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: srnowlin (---.keytechcommunication.com)
Date: January 03, 2008 08:53PM

Perhaps it is missing steps.

My aim was not to post the entire config file here but only the areas that I changed.

To list my steps:

1. I used myphpmyadmin to make password for my root user.
2. I went into the config.inc.php and made an entry phrase for the 'blowfish_secret'
3. I changed my authentication to 'cookie'

And since my config.inc.php has an entry regarding 'nopassword' I set that value to false.

To Test:
1. I made a new general index.html for the www root.
2. I renamed my original index.php to something that would allow me to access it if I directly entered the complete path.
3. I edited the myphpadmin alias to allow external access via the web (from a specified external address)
4. Clicked Put online.

I can access myphpadmin via my root user and password from a login screen. This is also true for my database only user.

Perhaps I am wrong, but I was taught never to hardcode a password, even in a development environment. It was better not to start that habit and have it make it into production.

So anyway, this is what I did to get mine to work.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: yfastud (Moderator)
Date: January 03, 2008 09:14PM

@ srnowlin

Firstly, wamp is intended for local developers. Second, there are too many ways to setup password and different people use different ways; however, some people might not use phpmyadmin so often and if using your way, when they need it they might forget the password; then, have hard time to figure out what it is or worse, they can NOT remember so they have to go through backup, uninstall, reinstall, restore, so on while w/ my way, it's easy to open config.inc.php to retrieve password

@ pam_w

Try some different methods to setup password and pick the one that work for you or you like most

Have fun,

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



Edited 2 time(s). Last edit at 01/03/2008 09:26PM by yfastud.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: srnowlin (---.keytechcommunication.com)
Date: January 03, 2008 09:29PM

Once again I must apologize Mr. Yfastud, you are of course correct, you CAN forget your password after you create it, no matter how it's created.

It was my mistake in reading that Pam HAD already created a password and was trying to reconnect to it using myphpadmin.

- quoting Pam -

I have installed and used WAMP with no problems so far. I used phpmyadmin to create a database and I added data. I thought I should include a password for the root user so I did this, using phpmyadmin again.

- end quote -


And since I had done something similar I THOUGHT I would suggest my way since it did work for me.

After all isn't that one way of experimenting with methods that work best for you?

- quote yFustads

Try some different methods to setup password and pick the one that work for you or you like most

- end quote

In this instance. Ms. Pam DID use phpadmin in the same or very similar manner as myself.

And since I wasn't addressing SOME people but Pam, herself, I thought I had something to offer, it was only a suggestion in the first place, I wasn't telling ANYONE how to do something other than maybe where to look in order to reconnect to her mysql using myphpadmin.

I like WAMP, I don't like this forum, so I shan't post again.

Good luck everyone.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: yfastud (Moderator)
Date: January 03, 2008 09:40PM

Don't be upset, and my apologies if you're really mad

However, if you read my post carefully, you will see that I did NOT stated that your way is not good or my way is better or so, but I only point out that each way has its good side, and since this forums is public so not only Pam read your posts but also all other people, so they have the right to know the good side of each method then pick the one that they like, right ;-)

Have fun,

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

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: pam_w (---.dynamic.dsl.as9105.com)
Date: January 04, 2008 01:49PM

Thanks for all your suggestions but as I removed WAMP and re-installed the password I set would no longer exist, I did a new install but I am still getting the error...

PAM

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: pam_w (---.dynamic.dsl.as9105.com)
Date: January 04, 2008 02:11PM

I have tried all your suggestions and none have worked so far!! Either I'm doing something wrong or my PC has gone mad. I have updated the config.inc.php file in loads of different ways and I'm still getting the same error. I thought if I removed everything and started again it would work as originally I didn't change the config.inc.php file at all and it worked fine. When I look at my config.inc.php file it is slightly different from the ones above.

Can anyone let me know which lines I need to update in the config.inc.php file if I complete a new install and don't want to have any password. I am only developing this for University and it will never need to go online...

Thanks again

Pam

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: pam_w (---.dynamic.dsl.as9105.com)
Date: January 04, 2008 02:47PM

Yay, I got it to work, I deleted all my temporary Internet files and all my Cookies and I can now access phpmyadmin! I decided to not add a password as this site is only going to be developed and not put online as it is for Uni. Thanks for all your help anyway.

Pam

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: yfastud (Moderator)
Date: January 04, 2008 03:12PM

Pam,

I'm glad it works for you and I'm really sorry not to put any more suggestion for this thread because it already has a user thought that I was so rude when I pointed out the good side of different methods so users can pick the one that suites their interest

On the other hand, feel free to drop me an email or pm or post a message any time you need help again ;-)

Have fun,

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



Edited 1 time(s). Last edit at 01/04/2008 03:14PM by yfastud.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: pam_w (---.dynamic.dsl.as9105.com)
Date: January 06, 2008 04:19PM

One thing you might be able to help me with, I need to demonstrate my project in University in a few weeks. I have developed the database at home. I am able to install WAMP5 on one of the University PCs but I am now sure how to open the database from there. Is this possible without putting it online?

Pam

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: yfastud (Moderator)
Date: January 06, 2008 04:34PM

It's safer not to access MySQL directly from outside, so you should put your server in on-line mode, and set permission in httpd.conf, or httpd-vhosts.conf if already setup vh, to allow the certain web ip only (i.e your univeristiy's web ip)

Let me make it a little more clear because it seems you're a little scare of the word "on-line". When in on-line mode, people can see your websites, but they don't actually gain access to your computer; however, if you setup to remote manage MySQL directly, it's a different story ;-)

On the other hand, people still see the websites which has MySQL databases w/o any problem because those websites and databases are stored in the same computer, so people access the websites, then the websites access the database to retrieve info, then show them in the browser for the users to see. On the other words, it's safe because the users can NOT directly manipulate the database, of course except professional hackers ;-) however, if your databases don't have any sensitive info such social number or credit cards' numbers, so on, you don't have anything to worry about; For example, you see my websites running 24/7 from my 3 computers, and except what you see in the browsers, can you get anything else from my computers?

Have fun,

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



Edited 2 time(s). Last edit at 01/06/2008 04:38PM by yfastud.

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


Sorry, only registered users may post in this forum.