Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

phpMyAdmin always annoyingly makes me login every 4000 seconds so I went to the "Users" part and removed the password for the "root" account which is what I was logged into (I changed it to "No Password"). I tried logging in without a password and it said that login without a password is not allowed. I went to the config file and enabled it (the AllowNoPassword thing) but then it would still not work. I changed some other stuff like nopassword to true and I finally got in but it seems as if my database is gone or something when I signed in. I went to my site on localhost and it seems like everything is gone. But could it actually be or is it just something to do with the user connecting to the database?

If phpMyAdmin deleted my database I will be furious.

I originally could login with username "root" and password "root" but then I went to the "Users" tab of phpMyAdmin and changed it to "No Password" and edited the config file to allow no passwords, but then it didn't work and once I got in it was a different user and none of my stuff was there, so maybe the user I was logged into didn't have the proper permissions to access my database?

I tried changing everything back but I still can't get in with username "root" and password "root".

Please help. I was almost done with my site and this happens. I can post any of the config files if you need it or any other info.

Thanks in advance.

share|improve this question
3  
It's probably a very bad idea to open up root access with no password.. Anyway, let's cut phpmyadmin out of the equation. Do you have root access to the server that MySQL is running on? –  Shane Madden Jul 3 '12 at 21:49
    
@ShaneMadden I think I do since it is on my computer (localhost), but I am not very experienced with accessing MySQL stuff other than using phpMyAdmin. –  Nathan Jul 3 '12 at 21:51
    
No time like the present! What OS are you on? –  Shane Madden Jul 3 '12 at 21:53
    
Mac OS X. I'm using MAMP for the server. –  Nathan Jul 3 '12 at 21:54
    
Would you know if the mysql database files are stored in the phpMyAdmin directory or in another directory? I might re-install phpMyAdmin and see if that works, but only if the actual database files aren't in the phpMyAdmin directory somewhere. –  Nathan Jul 3 '12 at 22:10

1 Answer 1

up vote 1 down vote accepted

I ended up fixing it (with help from @ShaneMadden).

I'm just going to tell how I solved it here, so future researchers can find the resolution quickly rather than having to look through all the comments.

To make it clear, the actual problem was that I went to the Users tab and for the root user I selected "No Password" in the settings dialog. Once I clicked save, it logged me out and when I tried logging in with no password, it wouldn't allow me to (it told me to enable the AllowNoPassword option in the config file). I enabled it but I did something else that messed up phpmyadmin. I finally re-installed phpmyadmin (as said in the comments) but I think the whole problem with the site not being able to connect to the database was that I never restarted the MySQL server and something happened with the password. Basically it was my fault.

I solved it by just putting no password in the mysql connect and logged into phpmyadmin by allowing no passwords in the config file. I added a password though. Now it works great. :) I didn't succeed in getting it to where I wouldn't have to login (since it's only on my computer), but oh well.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.