Why mysql (mariadb) keeps asking for password even if the --password is in the command line?

Avio :

This thing is driving me crazy. If I write:

mysql -unextcloud -pnextcloudpassword -h 127.0.0.1 -p 43306 -D nextcloud-db

I always and anyway get a Enter password: following (that can't even be aborted by Ctrl-C).

Why? How can I avoid it?

I've already tried every combination of [-u|--user|-p|--password] with any combination of space and =. And then I get a connection refused that makes absolutely no sense, but that's another problem (and another source of insanity).

Thanks!

Pete Kelley :

I noticed you have a parm "...-p 43306..." - that's really the password
you probably want "...--port=43306...". .
or use capital P for the port parm "...-P43306..."


If that doesn't help - can you post the actual response?
Cheers!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=372592&siteId=1