• Register
0 votes

Problem :

Whenever I want to open a mysql in my windows cmd by simply typing mysql. I am facing below error :

“ERROR 1045 (28000): Access denied for user ODBC@localhost (using password: NO)”

After that by looking at similar queries I somehow got the temporary solution by using the C:> mysql -u root -p and then typing the required password, then  mysql is working. But when I close and reopen it, the same problem is happening.

One more issue is that I have created the user 'admin'. but when I am trying to open the mysql using the command as below :


C:> mysql --user=admin --password=root,


The following error is showing up again :


C:\Users\alecxe>mysql --user=admin --password=root
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password:NO)


Any pointers will be the great help.

6 5 3
7,540 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

Because of some critical reasons a ODBC username is always a default username under a windows even if you did not create a user at a setup time. By simply typing below :


Without specifying the username will attempt to connect it with the non-existent ODBC username, and it will give below error:

Error 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)


Instead of that please try specifying the username that you know, for example as below:

mysql -u root -p


Where the -u root is specifing your username root and the -p will make above command to prompt for your password.

9 7 4
38,600 points
http://mewkid.net/when-is-xuxlya3/ - Amoxil Causes Gallstones <a href="http://mewkid.net/when-is-xuxlya3/">Amoxicillin 500mg Capsules</a> klq.nmwn.kodlogs.com.utd.ee http://mewkid.net/when-is-xuxlya3/
http://mewkid.net/when-is-xuxlya3/ - Amoxicillin 500 Mg <a href="http://mewkid.net/when-is-xuxlya3/">Amoxicillin 500mg Dosage</a> xqh.olfd.kodlogs.com.auy.kw http://mewkid.net/when-is-xuxlya3/
0 votes

The user cannot log in to the MYSQL server with a simple mysql command at the prompt. This is a very minor issue and can be solved quickly by using the correct MYSQL login command at the terminal window.

Login using the command-line client:

The MYSQL packages come with the Command-Line Client with which you can work with the database. The commands need to be typed in manually and this helps you in learning the language properly.

The MYSQL command Line Client can be launched by the following method;

  • Go to All Programs.
  • Go to MYSQL.
  • Then Go to MYSQL Server 5.1.
  • After that click on the MYSQL Command Line Client.
  • The user can also load it from the terminal window, but simply typing mysql followed by the “Enter” key at the DOS prompt window will throw the above error.


To login successfully you have to provide the password. For instance, if you launch the MYSQL Command Line Client, it waits for the user to type in the password.

A simple “mysql” command is insufficient for logging in at MYSQL. The user need to use;

 mysql –u root –p

Here root is the user name and can be changed if your logging in information is different. The program now waits for the password which was set up when MYSQL was installed on the Windows computer.


11 5 2
3,890 points

Related questions

0 votes
1 answer 4 views
Problem: How may I fix it and continue > Error 1045 (28000): access denied for user 'root'@'localhost' (using password: no)
asked Apr 25 ummeshani 9.5k points
0 votes
1 answer 8 views
Problem: I know this question may have answers already in stackOverflow . But I have different issue here . I moved the laravel project from localhost to server . Which I have done every steps in server. I can able to view the login page in my server. The problem is, I ... 'root'@'localhost' (using password: NO) (SQL: select count(*) as aggregate from users where email = *Emails are not allowed*)
asked Apr 25 Yeamin 22k points
0 votes
1 answer 117 views
0 votes
1 answer 6 views
Problem: As I mentioned in my previous query, I'm having difficulties with my learning; I've tried searching the web but haven't been able to find adequate information; could you assist me in continuing my project?
asked Apr 1 rakib1 51.5k points
1 vote
1 answer 3 views
Problem: I am unable to find the correct solution for this please help: 1045 access denied for user localhost using password yes.
asked Apr 26 PkGuy 23.5k points
0 votes
1 answer 133 views
0 votes
1 answer 9 views
Problem: Please let me know any solution regarding this .. Mysql error 1045 28000 access denied for user
asked Apr 27 Ifra 36.4k points
0 votes
1 answer 102 views
Problem : Any help on this issue: Mysqli_real_connect(): (hy000/1045): access denied for user 'pma'@'localhost' (using password: no) .
asked Mar 6 Wafa Abu Yousef 6.1k points