参考文档
https://cloud.tencent.com/info/cb65df1aa2d230bab04643831d8e3253.html
最后测试成功
[root@rwsoda203db1 ~]# mysql -h 127.0.0.1 -P 4000 -u root -D test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.25-TiDB-v3.0.0-rc.1-78-ga3b3326a2 MySQL Community Server (Apache License 2.0)
Copyright (c) 2000, 2019, 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 |
+--------------------+
| INFORMATION_SCHEMA |
| PERFORMANCE_SCHEMA |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> use test
Database changed
mysql> show tables;
Empty set (0.01 sec)
mysql>