【 TiDB 使用环境】测试
【 TiDB 版本】v8.1.0
【复现路径】
按照官网文档操作后:https://docs.pingcap.com/zh/tidb/stable/quick-start-with-tidb#在单机上模拟部署生产环境集群
【遇到的问题:问题现象及影响】
外部 mysql 客户端无法连接到tidb,但是本地localhost登录却可以。
连接命令: mysql -h 172...* -u myuser -P 4000;
注意:我并没有设置密码。
报错:Access denied for user ‘myuser’@‘172...’ (using password: NO);
设置了密码也不行,报错:
Access denied for user ‘myuser’@'172...’ (using password: YES);
mysql 版本 :mysql Ver 8.0.39-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
【资源配置】
global:
user: "tidb"
ssh_port: 22
deploy_dir: "/tidb-deploy"
data_dir: "/tidb-data"
# # Monitored variables are applied to all the machines.
monitored:
node_exporter_port: 9100
blackbox_exporter_port: 9115
server_configs:
tidb:
instance.tidb_slow_log_threshold: 300
tikv:
readpool.storage.use-unified-pool: false
readpool.coprocessor.use-unified-pool: true
pd:
replication.enable-placement-rules: true
replication.location-labels: ["host"]
tiflash:
logger.level: "info"
pd_servers:
- host: localhost
tidb_servers:
- host: localhost
tikv_servers:
- host: localhost
port: 20160
status_port: 20180
config:
server.labels: { host: "logic-host-1" }
- host: localhost
port: 20161
status_port: 20181
config:
server.labels: { host: "logic-host-2" }
- host: localhost
port: 20162
status_port: 20182
config:
server.labels: { host: "logic-host-3" }
tiflash_servers:
- host: localhost
monitoring_servers:
- host: localhost
grafana_servers:
- host: localhost