SQLyog is an absolutely brilliant GUI front-end for MySQL databases. Delivering all functionality you could ever want to apply to a database, MySQL makes database administration a breeze and more importantly, a snap.

Have you ever come across the following error dialog when trying to connect to a MySQL database?

Error No. 1045: Connection denied for ‘someuser@somehost’ (using password: YES/NO)

Basically what this is, is a user authentication error. In other words, the user details specified does not “match” the user tables on the specified MySQL server.

Reasons for this could include the user account simply not existing, the wrong password for that particular user, or lastly, the user specified may not actually be able to connect from the host you are currently using.

The last one is the interesting one and usually the most common cause of throwing up the error when trying to use SQLyog to administer an external database.

Typically MySQL only allows connection from ‘localhost’ by default. If you want to allow an user to connect from a different host, you’ll need to edit the privileges for that user on the native machine and specify that the host.

Wildcard characters do of course make our lives much easier and as an example using phpMyAdmin on the MySQL server machine, you can see from the picture below that I’ve changed a user account’s privileges to allow him to connect from any host by using the value of % in the host field.

So make sure you have the right user password and user name, make double sure that your user can access from any host and blam, your connection denied error should soon be a thing of history! :)