i got this error to on my database

"Host 'localhost' is not allowed to connect to this MySQL server"

and when i tried to use mysql workbench i got this

"cannot connect to the database server"

what is wrong with my database, its the second time happen to me. yesterday i got this problem and i don't have any idea why is it happening i tried to look answers in google but i din't find any answers, that was the first time i encounter that error. i cant find any solution on that, what i do is, i tried to re-install my mysql full re-installing then it goes find and working will, but today when i start up my PC and I open my database I got the problem again the same as my problem yesterday.

BTW I am using MySQL 5.5

Can ask somebody who can help me about this. I have no other Idea how to fix it.

I will appreciate for any help

Recommended Answers

All 5 Replies

are u able to work with mysql usin phpmyadmin, there i think you can look into privileges, where you can specify which host,user can connect and what he can access.

i am not using phpmyadmin, when i tr to access the user privileges using "Manage Security" on mysql Workbench, its still i got the error Host localhost is not allowed something like that. when i try to use the mysql command line client when i open it it will automatically closed. i dont know what is happening.

Host localhost is not allowed something like than

It pays to read error messages a little more closely than "something like that".
What does it say exactly? Probably 'user@localhost is not permitted' or something like that.
Try to connect with the mysql command line program and mysql -uroot In a standard XAMPP installation the root@localhost account does not need a password. Otherwise, if you have set a root password on installing, connect with mysql -uroot -p<password> The you can have a look at the mysql.user and mysql.db tables to see which privileges are set.

commented: yes +13

i cant access into command line client even the password is right, then when i entered the password it was automatically close the command line client. then i tried to use phpmyadmin but i got "Acces denied".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.