您必須使用mysqlsh(mysql shell)而不是mysql。
mysqlsh
mysql
使用--uri=選項(xiàng)。
--uri=
https://dev.mysql.com /doc/mysql-shell/8.0/en/mysqlsh.html#option_mysqlsh_uri