MySQL Forums
Forum List  »  General

--protocol option of mysql client program confuses me
Posted by: aaron chan
Date: October 09, 2017 04:15AM

"The --protocol option enables you to establish a particular type of connection even when the other options would normally default to some other protocol."
the explanation makes me think the --protocol option has a high priority and it decides which protocol to use and it will pick up other necessary corresponding options and ignore irrelevant options to make a connection.
However,the error below confuses me:
[root@ansible2 ~]# mysql --no-defaults-file -uroot -p8Lv1Dnfc@ --host=10.82.12.69 --socket=/app/mysql/3306/socket/mysql.sock --protocol=socket
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2047 (HY000): Wrong or unknown protocol

here,i specify the protocol to be "socket",and the socket file path is right,but ERROR 2047 happens. why does not ignore the "--host" option automatically?

Options: ReplyQuote


Subject
Written By
Posted
--protocol option of mysql client program confuses me
October 09, 2017 04:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.