Can't Login to mysql

10 posts / 0 new
Last post
#1 Mon, 05/10/2010 - 21:35
mdtiberi

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)

Mon, 05/10/2010 - 22:37
andreychek

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

Tue, 05/11/2010 - 11:07 (Reply to #2)
mdtiberi

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)

Tue, 05/11/2010 - 12:22
andreychek

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

Tue, 05/11/2010 - 12:43 (Reply to #4)
mdtiberi

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.

Tue, 05/11/2010 - 14:04 (Reply to #5)
mdtiberi

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.

Fri, 05/14/2010 - 11:48
andreychek

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

Tue, 07/24/2012 - 05:05
nandt

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..

Thu, 11/15/2012 - 02:42
Welshman
Welshman's picture

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

Did this and it was sorted.

$ mysqladmin -u root password NEWPASSWORD

Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Sat, 08/27/2016 - 12:48
Francewhoa
Francewhoa's picture

- - -
Senior Product Manager, and Co-Founder at Ubertus.org Inc.
Love back your Virtualmin & Webmin community

Topic locked