ERROR 1045: Access denied for user: 'ODBC@localhost' <Using password: NO>


I'm getting the above error when trying to configure MySQL, after I type the following:

c:\mysql\bin\mysql mysql

I don't have the faintest idea what to do. (I have another question open related to this subject, but unfortunately I let the problem go waaay to long and the question is too old.).

Can anyone help me, with very explicit instructions. This is my first experience with MySQL. Thanks.

Who is Participating?
lokusConnect With a Mentor Commented:
With  c:\mysql\bin\mysql mysql you are connecting to the MySQL database server as an anonymous user, in the case of Windows the default user name is ODBC if you do not provide one.

The anonymous user in the default installation only has privileges to access the `test` database. You are trying to access the `mysql` database which cause the access denied.

If you want to access the `mysql` database, you have to use the root user.
c:\mysql\bin\mysql -u root mysql
should do the trick.
If you have set a password for the root user then you have to add the -p option
c:\mysql\bin\mysql -u root -p mysql

To find out all the available options of mysql, run c:\mysql\bin\mysql --help

kara334Author Commented:
Thank you so much! Do you know how many hours I struggled with this? Here are your well deserved points!
Looks like you simply havent supplied a password or username. Check the code/config file for username and password.
someone tell me pls .. how can i change the pass root from default instalation when i am allready sing in with an anonymous account. from old version of mysql  ( 4.0.21 ) on (Documentation ) was a line command with change root pass from default, but now can`t find that line and i want to use the newversion and have the same problem.

witch is THAT line ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.