MYSQL Shell connect error from Command line

Viewed 4044

I am trying to connect to mysqlshell client from my linux command line when I try to connect, using

mysqlsh mysql -h IP -u user -ppassword -e "show databases"
mysqlsh mysql -h IP:port -u user -ppassword -e "show databases"
mysqlsh mysql -h IP:port -u -port 3306 user -ppassword -e "show databases"

I get the below error.

Conflicting options: provided host differs from the host in the URI.

Could you please help with this?

1 Answers

The proper format of mysqlsh is a bit different:

mysqlsh --user=user --password=password --port=5721 --host <hostname or IP>
Related