Q:

MySql xdevapi with node.js: "The server connection is not using the X Protocol"

I installed MySql 8 on Linux
~$ mysql --version
mysql  Ver 8.0.11 for Linux on x86_64 (MySQL Community Server - GPL)

I performed all the basic configuration (created one schema, one user with grants for that schema and some tables). I tryed to perform a connection by using xdevapi in node.js, just a simple test.
const mysqlx = require('@mysql/xdevapi');

const dbCfg = {
    "host": "127.0.0.1",
    "port": 3306,
    "password": "xxxxxxxxx",
    "user": "someuser",
    "schema": "someschema"
};

mysqlx.getSession(dbCfg).then(session => {
    console.log("this is the session! ", session);
});

And I get the following error: 
"Error: The server connection is not using the X Protocol. Make sure you
        are connecting to the correct port and using a MySQL 5.7.12 (or higher) server intance"
If I google for "the server connection is not using the X Protocol" I get just one result! to the source code of the connector (https://dev.mysql.com/doc/dev/connector-nodejs/8.0/lib_Protocol_Client.js.html).
If I try to connect via mysqlsh with the same parameters everything works ok.
If I run the query "show plugins", the mysqlx plugin is there: 
| ngram                      | ACTIVE   | FTPARSER           | NULL    | GPL     |
| mysqlx                     | ACTIVE   | DAEMON             | NULL    | GPL     |
| mysqlx_cache_cleaner       | ACTIVE   | AUDIT              | NULL    | GPL     |

So everything seems to be ok
Any suggestion/help?
Thanks in advance!

A:

You are connecting to the wrong port. The X DevAPI is supported through the X Protocol and the X plugin on the server which is available, by default, on port 33060.

