Can't Login to mysql

For some reason I no longer have a password set when logging into mysql. I have the following when I access the MySql Database Server and I haven’t changed my password.

Any help would be appreciated.

Webmin needs to know your MySQL administration login and password in order to manage your database. Please enter your administration username (usually root) and password below.

The full MySQL error message was : DBI connect failed : Access denied for user ‘root’@‘localhost’ (using password: YES)

You may want to try going into the MySQL module, and re-setting the password.

You can do that by going into Webmin -> Servers -> MySQL -> Module Config -> Configuration Options.

From that screen, you can set what the current MySQL Password is in “Administration password”.

-Eric

What then is the Login? I have tried root, admin, administrator and changed the module config as you suggested and still get the following error:

The full MySQL error message was : DBI connect failed : Access denied for user ‘root’@‘localhost’ (using password: YES)

The username would be root, I don’t know what the password would be…

Does someone else have admin access on your system? There’s no reason the MySQL password would change unless someone went in and changed it.

-Eric

My root password is no longer recognized. No one has access to my system. This was unusual because of the message from Webmin in my first post, it was like it forgot it. I have tried various methods of changing the root password but to no avail. This started happening after the upgrade to Webmin 1.510.

Ok I found a way to at least get into the webmin page for Mysql by stopping it and then restarting using:

mysqld_safe --skip-grant-tables -u mysql root &

I changed the password when I had access but after restarting mysql normally I still could not get in.

Are you able to access MySQL from the command line?

For example, if you type “mysql -u root -p”, then enter the root password when prompted, does that let you in?

-Eric

what i did is to change the password for the user xxxxx in his account from virtualmin…
so i did…
edit databases–>password–>custom password and i change it to xxxx (this is the pass i used in my database setting…) as it was set by default the administration passwords so it needed to be the password for accesing the domain in my server).

(this eventully change the password for accessing phpmyadmin but i beleive this is set up to be like that sometime and i can’t be asked when…)

problem solved…

Had the same problem, I had reinstalled mysql and php.

Did this and it was sorted.

$ mysqladmin -u root password NEWPASSWORD

Another option at https://www.virtualmin.com/comment/758368#comment-758368