If you receive a 1045 error, you may need to reset your password. Here are the official instructions for resetting the password: http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html
If you find these instructions confusing, here’s another method.
1. Find the my.ini file (my.cnf for linux). On windows, the my.ini file is typically in your install directory: c:\Program Files\MySQL\MySQL Server 5.1\my.ini Open the file with notepad (or any text editor) and add the following entry under the [mysqld] section:
Then, save the file and restart the MySQL service. This has disabled the grant tables so you should be able to log into mysql without any password ( no more 1045 errors ). Now, we need to reset the password.
2. Log into MySQL with the MySQL command-line utility. This can be found in the MySQL bin directory. No user or password parameters are required since grant tables have been disabled. Execute the following statement:
UPDATE mysql.user SET PASSWORD = PASSWORD(”) WHERE user = ‘root’ and host=’localhost’;
This example will replace the root password with an empty string or no password. Feel free to substitute the appropriate password in the PASSWORD(”) function or leave it blank and change the password later.
3. Remove “skip-grant-tables’ from the my.ini file and restart the MySQL service.
4. Log into mysql. Example: shell>mysql -u root
I hope this helps.