1

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?

1 Answer 1

5

Don't put a space after -p

mysql -u user1 -ppassword1 -e "show databases" 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.