IT練習ノート

IT関連で調べたこと(実際は嵌ったこと)を書いています。

XProtocolのポートを変更

ハイフンではなくアンダースコアであることに注意

設定ファイル

[mysqld]

mysqlx_port=8001

コマンドライン

mysql.server start --mysqlx_port=8000

クライアント接続

$ mysqlsh -p -u root --port=8000
Creating a Session to 'root@localhost:8000'
Enter password:
Node Session successfully established. No default schema selected.
Welcome to MySQL Shell 1.0.9

Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type '\help', '\h' or '\?' for help, type '\quit' or '\q' to exit.

Currently in JavaScript mode. Use \sql to switch to SQL mode and execute queries.
mysql-js> session
<NodeSession:root@localhost:8000>
mysql-js>

クライアント接続エラーのケース

(root)blender:~ ogawanaoto$ mysqlsh -p -u root --port=8001
Creating a Session to 'root@localhost:8001'
Enter password:
ERROR: 2003 (HY000): Can't connect to MySQL server on 'localhost' (61)