Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MYSQL Shell connect error from Command line

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?

like image 752
Anbuchezhian Elanchezhian Avatar asked Dec 05 '22 11:12

Anbuchezhian Elanchezhian


1 Answers

The proper format of mysqlsh is a bit different:

mysqlsh --user=user --password=password --port=5721 --host <hostname or IP>
like image 172
Romeo Ninov Avatar answered Jan 02 '23 13:01

Romeo Ninov