Server info I'm running an Ubuntu 14.04 server with apache and some other goodies installed.

Problem I previously had a plesk trial installed but it expired so I uninstalled it. Ever since then mysql has been messed up. The issue I'm having is that I cannot login to the root user. I think that I may have accidentally skipped the part where I add the password for that user.

Things I've Tried From what I understand, I need to stop mysql and start it in safe mode so I do not need to enter a password.

I have used set password for root@localhost When logged in with the root user in mysql safe mode I tried set password with no user specified, thinking this would edit the current user's password. After I change the password and restart the mysql server it seems that nothing has been changed.

I have also tried logging into phpmyadmin in safemode and creating another user with all privileges. When safe mode is disabled, these changes are non-existant.

All of my attempts have been made from a remote location.

At this point in time I'm starting to think that I should just reinstall mysql completely so that it can possibly be reset. Should I just restart from scratch? Or shall I give it another try? I think that if I cannot get it to work I will just wipe the server and start again with an open source control panel.



There is some missing information here in order to get you where you need to be. If you restarted MySQL in safe mode, did you change the password for the root user? Is there multiple root users in the user table? For instance you may have root@localhost, root@%, root@.

Once you make changes to the user table you need to FLUSH PRIVILEGES; If you don't your changes (ie. password being updated) will not be reflected.

If your my.cnf (MySQL config file) has the server limited to localhost access only, you will not be allowed to access MySQL from outside the server, so if for instance your PHPMyAdmin is running on another machine, this will not be allowed. Cartain config changes may require you to restart MySQL as well, so try taking a look at what I have mentioned here and see if it helps, otherwise provide some more info so that we can help you further.

  • Thanks for the reply!! The funny thing is that I have not yet tried to change it on the localhost. Can I edit the my.cnf to allow me to do it remotely? I have tried setting only the root @ localhost password. I also logged into mysql as root in safe mode and just used set password with no user specified. When I flushed privileges it always said 0 rows affected or something similar. I'll update my question with this info – Ryan Cady Oct 1 '15 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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