0

I'm trying to do a backup of a MySQL database on Windows, but for some reason it's trying to log me in as ODBC instead of root - does anyone know why?

As you can see below the red line, I can login to MySQL no problem.

8
  • @RolandoMySQLDBA I get root@localhost for both. Sep 4, 2014 at 14:16
  • 1
    Please run SELECT user,host,password FROM mysql.user WHERE user='root';. Questions: 1) How many root users are there ? 2) Do all root users have the exact same encrypted password ? 3) Do any of the root users have a blank host or blank password ? Sep 4, 2014 at 14:24
  • @RolandoMySQLDBA Here's the output. I'm not sure if maybe you missed this part though - it's trying to authenticate me as the ODBC user, not root. Thanks for your help, I appreciate it! Sep 4, 2014 at 14:26
  • 1
    Question: Does the my.ini have a [mysqldump] section ? If so, please post it (hiding the password if supplied). Sep 4, 2014 at 14:35
  • Try mysqldump -uroot -p ideal_inv > ideal_inv.sql. Does it prompt for a password ? Does it run when you give it the right password ? Sep 4, 2014 at 14:39

2 Answers 2

0

The only thing I can suggest is to explicitly choose a host by doing one of the following:

mysqldump -hlocalhost -uroot -ppassword ideal_inv > ideal_inv.sql

mysqldump -h127.0.0.1 -uroot -ppassword ideal_inv > ideal_inv.sql
0

In the end I couldn't get mysqldump to login as root, it kept trying to login as ODBC. Instead I added this to my my.ini file and ran the command without user/password arguments:

[mysqldump]
user=root
password=XYZ

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.