I am trying to import json data from a file as shown here: https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-json-import-command.html
But when I try this
mysqlsh root@127.0.0.1:8306/mydb --import /countries.json country_staging jsondata
I get this error
ERROR: Util.importJson: An X Protocol session is required for JSON import.
But when I try setting the x protocol doing this
mysqlsh --mysqlx root@127.0.0.1:8306/mydb --import /countries.json country_staging jsondata
I get this error
MySQL Error 2027: Requested session assumes MySQL X Protocol but '127.0.0.1:8306' seems to speak the classic MySQL protocol (Unexpected response received from server, msg-id:10)
I have no idea how to solve this and the official documentation doesn't really say a lot about it. I am using the official docker mysql:8 image for my docker container.