Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to acces mysql server on my system in sql yog.but it is giving me error of

access denied for user root @ to database database name 

what can i do to solve this .

share|improve this question
up vote 0 down vote accepted

You might want to check the users table in mySQL and ensure that there is a valid entry there for root@

There normally will be an entry for root but the hostname would be localhost which will not allow root@ to connect.

If you want to access the system as root from this ip address you need to make a valid host for the root user or use wildcard % which would allow you to connect from any ip address (not recommended).

The best solution would be to configure SQLYog to use root@localhost when connecting to you local system. I haven't used SQLYog so I am not really sure how to go about doing this.

Look here for the reference on adding users in mySQL.

share|improve this answer
I have one entry in db table of host:,db:mydb,user:root,all priviliages yes except gran priveilages no. and in users table i have one entry of this Host : user root , all privilages yes except grant privl – Rahul Mehta Dec 7 '10 at 12:18
still i am not able to connect through sql yog – Rahul Mehta Dec 7 '10 at 12:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.