4. 连接验证
查看 user.xml 文件中的 shardingUser 用户,并使用 mysql 客户端建立连接,如出现以下情况表示连接建立成功。
[root@localhost ~]# mysql -uroot -p123456 -P8066 -hyour_ip
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.11-dble-3.20.10.0-b29c7c91ac638509dbc4f2c146aea41c3f9f0b83-20201203053354 dble Server (ActionTech)
Copyright (c) 2000, 2020, 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;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+----------+
| DATABASE |
+----------+
| testdb |
+----------+
1 row in set (0.04 sec)
mysql> use testdb;
Database changed