These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for DBI connect failed : Access denied for user 'root'@'localhost' to database 'mysql' on the new forum.
I am getting error message like this :
DBI connect failed : Access denied for user 'root'@'localhost' to database 'mysql'
i am unable to add new VPS server or delete any Vps server .
unable to add new user or delete any thing everytime when i do this get error message like this.
DBI connect failed : Access denied for user 'root'@'localhost' to database 'mysql'
please help me what i done wrong ??
recently i restore backups !! from my backups.
thank you. aryan
Howdy,
Try going into Webmin -> Servers -> MySQL -> Module Config, and there, set "Administration password" to your correct root MySQL password.
If that doesn't work -- did you perhaps change to a non-standard MySQL version recently, such as one from a third party repository?
-Eric
tried but not worked ,
i have in my memory what is password , i didn't forget it so not required to change.
if i change in the method you just told it not getting login with new password , only works with my old mysql password .
error message still there
my mysql password is correct and working fine in SSH and webmin mysql login but only getting this error.
unable to delete a server or create same error coming.
Did you perhaps change to a non-standard MySQL version recently, such as one from a third party repository?
Also, what distro/version are you using?
-Eric
No, i didn't change mysql only i did , i migrate this current server to a new VPS server by backup this server and restore to new VPS ,
after that i delete this server ,
after someday i just restore data backup to this server from that backup data file , after that problem started .
any idea??
also a new problem with my new VPS i am not able to loging via FTP . error message is connection REFUSE !! i restore this server from my old one.
hello,
check if /root/.my.cnf exist, it might be the problem
its say No such files in directory
What distro/version is it that you're using?
-Eric
4.06.gpl centOS Linux 6.5
Okay, and what is the output of this command:
rpm -qa | grep mysql
is is asking for password and when i put my mysql password : access denied !!
The command Eric asked you to execute has nothing to do with MySQL, it's a call to "rpm", the CentOS package manager. It should not ask you for a password, and you should not need the MySQL root password there!
Howdy,
Okay, that MySQL version looks correct.
However, your previous comment makes me wonder... what happens if you run this command:
mysql -u root -p
And then enter your MySQL password -- does it allow you into MySQL?
If so, what happens if you then run this command within the MySQL shell:
use mysql
Do you receive any errors trying to run "use mysql"?
-Eric
Howdy,
Okay, that MySQL version looks correct.
However, your previous comment makes me wonder... what happens if you run this command:
mysql -u root -p
And then enter your MySQL password -- does it allow you into MySQL?
If so, what happens if you then run this command within the MySQL shell:
use mysql
Do you receive any errors trying to run "use mysql"?
-Eric
i am able to access my mysql by using my password with this command mysql -u root -p
but when i try this command "use mysql" again same message display "ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql"
any idea ?
Thank You.
SQL is having trouble to localhost not also setup in the DNS as 127.0.0.1 I am using proxmox virtual environment at the container level and i had to setup it there..
Best Regards, Rohit
www.interstellarconsulting.com
Hi, I have got the same problem as above: The full MySQL error message was : DBI connect failed : Access denied for user 'root'@'localhost' (using password: NO). When I type
rpm -qa | grep mysql
I getphp-mysql-5.4.16-36.1.el7_2.1.x86_64
, than aftermysql -u root -p
I getEnter password:
and after I enter password I getERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I have got centos-release-7-2.1511.el7.centos.2.10.x86_64. Any Idea?
Pawel
Even i got the same error,
I am using Centos 6.8 Virtualmin 5.0.3 GPL.
I just changed the password of root going to Webmin ->System->Change Password (Change password for root and mysql)
after that i can able to login Webmin -> Server -> MySQL Database Server. Done.
Then go to Virtualmin -> System settings ->Features and Plugins. Select the MySQL database and Save.
If you are getting a following error
Just go to
Hostname and DNS Client or https://your_hostname:10000/net/list_dns.cgi and add 127.0.0.1 in your DNS servers. Save -> Apply Configuration.
Now again go to Virtualmin -> System settings ->Features and Plugins. Select the MySQL database and Save.
Just restart the webmin under webmin configuration and re-check the configuration under Virtualmin -> System Settings.
This way it solved the dbi caonnect mysql problem for me, hope this will help newbie like me.