I desperately need help. I did something and really messed up my administrative abilities.
I am logged in to virtualmin as root, but if I try to access things like "Edit Users", I always get the same error.
DBI connect failed : Access denied for user 'comtoistech'@'localhost' to database 'mysql'
I tried the suggestions on other topics for resetting passwords via the terminal but nothing has fixed the issue.
What I don't understand is that I can log into phpmyadmin as the user "comtoistech" without a problem, and my website seems to be working ok, mostly.
If I am logged in as root, why is it telling me it can not access mysql as comtoistech@localhost.
I think this may have started when I was changing some user names to reflect the new domain, and I may have removed one under the old name, but can't be certain.
I read somewhere that you can just add the user under localhost but I can't find anywhere to do that, and if I try to access anything under Webmin for Mysql, like user permissions, database permissions, or host permissions, I get the same error.
Comments
Submitted by JamieCameron on Tue, 02/12/2013 - 13:04 Comment #1
You may have configured Webmin with the wrong credentials for logging into MySQL.
Try going to Webmin -> Servers -> MySQL Database, and enter the correct
root
login and password for MySQL.Submitted by comtoistech on Tue, 02/12/2013 - 20:28 Comment #2
Hi Jamie,
Thanks for the quick reply...
That's just the problem....I can't even do that...if I go to Webmin >Servers > MySQL Database and try to open User Permissions or Database permissions, Table Permissions Field Permissions, or any of the option on that screen I get the error.
That is what I meant by administrative lockout.
I can give you access if you want to see for your self how far the lockout goes.
Submitted by andreychek on Tue, 02/12/2013 - 20:55 Comment #3
What do these two commands output... this will show what Webmin/Virtualmin is using as the master MySQL login:
grep login= /etc/webmin/mysql/config
grep pass= /etc/webmin/mysql/config
Submitted by comtoistech on Tue, 02/12/2013 - 21:11 Comment #4
Submitted by andreychek on Tue, 02/12/2013 - 21:15 Comment #5
Yeah it looks like Webmin is configured to use the user "comtoistech" to access MySQL. That would normally use root.
My suggestion would be to edit the file
/etc/webmin/mysql/config
, and to change the login= line to be "root", and then change pass= to your root MySQL password.Once you do that, restart Webmin with this command:
/etc/init.d/webmin restart
After that, does it work correctly?
Submitted by comtoistech on Tue, 02/12/2013 - 21:28 Comment #6
I think I changed it somehow previously because my joomla website was giving me an error about not being able to connect to the the database. I can't recall how or where I did it.
I'll try you suggestion and get back to you on the results. Thanks Jamie
Submitted by comtoistech on Tue, 02/12/2013 - 21:45 Comment #7
Jamie You are the BEST!
Worked like a charm! I have access to everything again!
This has been stumping me for months, and you fixed it so easily! You are awesome! I owe you a beer my friend.
I also noticed old references to my old database name "promaxia" which I changed over to "comtoistech" in the file. Everything seems to be working smoothly again. I am so happy. I was about to give up and start all over from scratch and build a new server, but you saved me from that nightmare. Thanks so Much!
You have my ever lasting gratitude. You are a genius!
Paul
Submitted by JamieCameron on Tue, 02/12/2013 - 21:54 Comment #8
Great! I will mark this as fixed then ..
Submitted by Issues on Tue, 02/26/2013 - 22:02 Comment #9
Automatically closed -- issue fixed for 2 weeks with no activity.