If I run the mysql
or mysqldump
programs from the command prompt, I get this in Windows:ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)
. I understand that 'ODBC' is the default user. Is there a way to change this somewhere?
I switch back and forth between Windows and Linux quite frequently and the slight difference kills me. While a simple -u root
isn't a lot of typing, forgetting it the occasion开发者_如何学Pythonal time is quite frustrating!
Looks like it's hardcoded in the source code, you have to change that and rebuild it yourself. A common trick would be to create a batch/bash program with the same name as the executable (of course you have to move the executable somewhere first, even on Windows due to .bat/.exe execution order) which checks for empty arguments. If they're empty, append '-u root' to the command, otherwise bypass the arguments to the real executable
精彩评论