[tidb@tidb-1 tidb]$ netstat -lntp |grep pd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 00192.168.10.61:2379 0.0.0.0:* LISTEN 17187/./bin/pd-serv
tcp 00192.168.10.61:2380 0.0.0.0:* LISTEN 17187/./bin/pd-serv
[tidb@tidb-1 tidb]$ netstat -lntp |grep kv
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 00127.0.0.1:20180 0.0.0.0:* LISTEN 17342/./bin/tikv-se
tcp6 00192.168.10.61:20160 :::* LISTEN 17342/./bin/tikv-se
[tidb@tidb-1 tidb]$ netstat -lntp |grep db
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 00 :::10080 :::* LISTEN 17462/./bin/tidb-se
tcp6 00 :::4000 :::* LISTEN 17462/./bin/tidb-se
链接测试
[root@localhost ~]# mysql -h 192.168.10.61 -P 4000 -uroot -D test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.25-TiDB-v5.0.1 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible
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 |
+--------------------+
| INFORMATION_SCHEMA || METRICS_SCHEMA || PERFORMANCE_SCHEMA || mysql ||test|
+--------------------+
5 rows inset(0.00 sec)