Avio
Avio

Reputation: 2717

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

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!

Upvotes: 0

Views: 281

Answers (1)

Peter Kelley
Peter Kelley

Reputation: 4196

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!

Upvotes: 1

Related Questions