Reputation: 6690
I am executing this command-
mysql -u user1 -p password1 -e "show databases"
and I expect to run the mysql "show databases" command successfully. But It's not happening that way. It's asking for password again, even though I've entered the correct password. This is what I get-
Enter password:
How can I get rid of this prompt where it asks for password even though I've given in my command?
Upvotes: 1
Views: 144
Reputation: 8863
Don't put a space after -p
mysql -u user1 -ppassword1 -e "show databases"
Upvotes: 5