I've looked everywhere an cannot seem to find a fix for this issue, despite tons of articles on it. Anyway, I'm attempting the following command

```
mysqldump -hlocalhost -uroot -p mydb mytable > myexportedtable.sql

```

This will occasionally result in the following error

```
mysqldump: Got error: 1045: Access denied for user 'ODBC'@'localhost' <using password:NO> when trying to connect

```

This is baffling for two reasons. One - I am specifying a root user in my command however it assumes I'm ODBC. Two - I only get this error occasionally. (more often than not). I am able to authenticate to the mysql interactive shell when specifying root but keep getting this error with mySQL dump. Any insight is greatly appreciated as I've been trouble shooting this for days now.