I can login to my mysql server using:
mysql -u root -p
Then I specify the password (i.e. PASS123) at the prompt. Login successful.
But when I try:
mysql -u root --password="PASS123"
i get:
mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
My MySQL version: mysql Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using EditLine wrapper
Maybe someone already had this problem? Is this a matter of some privileges that needs to be set additionally to allow login with password specified on command line?

"or!or$. Anyway, you should learn how to use option files so you don't have to put passwords on the command-line at all. dev.mysql.com/doc/refman/8.0/en/option-files.html - Bill Karwin