【 TiDB 使用环境】生产环境 /测试/ Poc
【 TiDB 版本】
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【附件:截图/日志/监控】
tiup client 调用dsn来连接tidb server,但是初始化时只有root用户,root用户改密后dsn文件不会更新,必须手动修改后才能连接成功。
[root@shawnyan 7.1]# cat dsn
mysql://root@192.168.8.171:4000[root@shawnyan 7.1]#
[root@shawnyan 7.1]# tiup client
tiup is checking updates for component client ...
Starting component `client`: /root/.tiup/components/client/v1.12.5/tiup-client
Error: can't open connection to mysql://root@192.168.8.171:4000: mysql: 1045: Access denied for user 'root'@'192.168.8.171' (using password: NO)
[root@shawnyan 7.1]# vi dsn
[root@shawnyan 7.1]# cat dsn
mysql://root:1@192.168.8.171:4000
[root@shawnyan 7.1]# tiup client
tiup is checking updates for component client ...
Starting component `client`: /root/.tiup/components/client/v1.12.5/tiup-client
Connected with driver mysql (5.7.25-TiDB-v7.1.0)
Type "help" for help.
my:root@192.168.8.171:4000=> select tidb_version();
tidb_version()
-----------------------------------------------------------
Release Version: v7.1.0 +
Edition: Community +
Git Commit Hash: 635a4362235e8a3c0043542e629532e3c7bb2756+
Git Branch: heads/refs/tags/v7.1.0 +
UTC Build Time: 2023-05-30 10:58:57 +
GoVersion: go1.20.3 +
Race Enabled: false +
TiKV Min Version: 6.2.0-alpha +
Check Table Before Drop: false +
Store: tikv
(1 row)
my:root@192.168.8.171:4000=>
https://github.com/pingcap/tiup/blob/master/components/playground/main.go#L527
for _, db := range dbs {
dsn = append(dsn, fmt.Sprintf("mysql://root@%s", db.Addr()))