The GUI tools provided by the folk who make MySQL are very useful;http://dev.mysql.com/downloads/gui-tools/5.0.html
So you’ve had a look, created a user account using the GUI tools, but you’re stuck and you can’t login. We’ll start this post by adding a user to your mysql server. Then we shall grant the login privileges needed for loggin in to your server from your hostname/ip-address.
The way I add users is like this. Download the GUI ‘mysql administrator’ tool and the ‘mysql query browser’. Use the query browser to login and create a new schema if you need one. To do this right click in the schema list box on the right hand side, and click create schema. Use the administrator tool to add your new user, and give the user appropriate rights to the schemas that users needs access to.
Check if the user account works by logging in using the query browser. If you want to do this from the command prompt, assuming you’ve installed mysql in C:\mysql5, run a command prompt (black dos window)
C:\> cd C:\mysql5\bin C:\mysql5\bin>mysql.exe -u USERNAME -p SCHEMA_NAME Enter Password: ******** mysql>
If you can’t login, make sure the schema name is correct. The problem may also be that you don’t have the right user privileges.
Try this to allow login from the host you’re using. Login using the query browser or command line as an administrator, such as root. We want to allow our user to connect to the server using a password from localhost. You can use any other hostname/ip-address you want instead of localhost/127.0.0.1. This can be done by running the following query. To do this in the query browser GUI type the query below into the top box in between the green refresh and execute buttons, then press execute.
grant usage on SCHEMA.* to USERNAME@LOCALHOST identified by ‘PASSWD‘;
If you want to do this from the command line, it will look like this:
mysql> grant usage on SCHEMA.* to USERNAME@LOCALHOST >identified by 'PASSWD'; Query OK, 0 rows affected (0.00 sec) mysql>
You should now be able to login. If your login attempt still fails, the mysql program will give you a detailed error message, so you can find out what’s wrong.