Jump to content

Archived

This topic is now archived and is closed to further replies.

obesechicken13

Help, I can't log into phpmyadmin

Recommended Posts

So I logged into phpmyadmin around maybe 4:30 today, then I went into the privileges area. I'd made a few users including root, and charlie (my name). Then I checked the boxes next to some of these users because I thought that would give them the privileges to do anything. Then I pressed the go button at the bottom right.

 

I don't think I made any major changes after that.

 

Now when I go to the http://localhost address in my browser the wamp server still loads up

Then under tools, I see two things

1: phpinfo()

2: phpmyadmin

 

When I click on phpmyadmin there is an error that says:

 

"Error

MySQL said: Documentation

#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 your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."

 

 

I can't even log into my root account using the command prompt either

I'll do:

mysql -u root -p //I've tried it with another user, not just root

then I enter my password

 

what show up is:

ERROR 1045 <28000>: Access denied for user 'charlie'@'localhost' <using password: YES>

 

 

I am using wamp server on a windows 7 machine. Please help!

Share this post


Link to post
Share on other sites

You obviously set up a root password for MySQL (WampServer by default has it blank).

Now you need to edit c:\wamp\apps\phpmyadmin3.x.x.x\config.inc.php so that PhpMyAdmin knows what password to use.

 

[edit]

 

I just looked into PMA privileges panel. The button on the bottom right is in the area described as:

Remove selected users  (Revoke all active privileges from the users and delete them afterwards.)

 

I don't know if it is possible to delete root user, but maybe that's what you did...

 

Try here:

http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

Share this post


Link to post
Share on other sites

Indeed wamp uses a blank password for default root user. By default phpmyadmin should work because it is already preconfigured to work after installation.  Make sure your cookies support is enabled on your browser.

Share this post


Link to post
Share on other sites

Cookie support is enabled, I'm certain because when I go to tools->options->privacy on firefox, it says: firefox will remember history.

 

I'm pretty certain that I did not delete any of my users, because when I try to log in with them in the command prompt, they still exist. I don't think I checked the remove users box, only the boxes for privileges, because I remember seeing the users still there in the privileges bar after applying the settings by pressing go.

 

I know that I have set a password for my root user, and I have logged into the root user with that password. Only now that doesn't work. The password is located in the correct location of the config.ini located in C:\wamp\apps\phpmyadmin3.2.0.1

 

I have no idea how I set a new mysql password. I tried to follow the instructions in the link you provided Mchl. I did everything until step 6 where whenever I tried the first command, with my specific mysql bin folder c:\wamp\bin\mysql\mysql5.1.36, I would either get the error: "the system cannot find the path specified" for the second command or I would get the error "'c:\wamp\bin\mysql\mysql5.1.36\mysqld-nt' is not recognized as an internal or external commmand"

 

 

 

Anyways, this is getting frustrating, should I just delete the mysql folder and reinstall it? Should I reinstall wamp?

Share this post


Link to post
Share on other sites

Try doing it in c:\wamp\bin\mysql\mysql5.1.36\bin\

Share this post


Link to post
Share on other sites

Ok, I just tried that and I got the same answer.

 

Can you tell me some steps to reinstall mysql that might help? :'( I just wanted to use magento, didn't want to lock myself out of my own web server

Share this post


Link to post
Share on other sites

How about using c:\wamp\bin\mysql\mysql5.1.36\bin\mysql instead of c:\wamp\bin\mysql\mysql5.1.36\bin\mysqld-nt ?

Share this post


Link to post
Share on other sites

Ok, so now I tried that in command and it still does not work.

I get an "unknown variable" error.

 

so what I type in cmd is:

c:\wamp\bin\mysql\mysql5.1.36\bin\mysql --init-file=c:\\mysql-init.txt

 

Anyways, I'll try something else and get back to you tomorrow.

Share this post


Link to post
Share on other sites

Ahah  :D It works! I simply cut and pasted the mysql folder(C:\wamp\bin) to the desktop so it wouldn't get in the way.

 

Then I reinstalled mysql, and cut and pasted that folder to where the old one was. Basically I replaced mysql with a new one.

 

Then I double checked the config file that I had the correct answer, resaved it, restarted all services for wamp, and then tried to go to phpmyadmin. I got in!

 

The command prompt is still screwy, so now I use the mysql client command prompt. I might just uninstall wamp though, since I lost access to my databases anyways :(

 

Anyways, thanks to both of you for the help!

Share this post


Link to post
Share on other sites

Your data is stored in c:\wamp\bin\mysql\mysql5.x.x\data\

You can backup this folder. Remove WampServer completely. Reinstall it. And then just copy folders containing your databases (except 'mysql' database - that's where users' data is stored AFAIR).

Do the backup and copying when MySQL service is disabled.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.