I have this command in linux
mysql -u xyz -p -e "show databases"
Where, the user “xyz” doesn’t exist. When it asks for password
-
if i don’t give any password it doesn’t give error message or a non-zero value when i run
echo $?command. -
if i give a password it gives error message
Any reason why? And any suggestions what I have to do to get an error message for this command?
I guess there is no other way but to run-
as mysql database doesn’t exist for non existing users.