From 5c0095652330ec5146cc6e489db600fbd5125196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Fri, 5 Feb 2021 11:41:46 +0100 Subject: [PATCH] Change the playground info for connecting to TiDB (#1133) A `tiup playground nightly` results in: ``` To connect TiDB: mysql --host 127.0.0.1 --port 4000 -u root ``` Running this doesn't work: ``` $ mysql --host 127.0.0.1 --port 4000 -u root ERROR 1045 (28000): Access denied for user 'root'@'127.0.0.1' (using password: YES) ``` This happens if a `~/.mylogin.cnf` is present or if a password is configured in `~/.my.cnf`. ``` $ mysql_config_editor print [client] password = ***** ``` Adding a `-p` to `mysql` will cause this to prompt for passwords, just pressing enter then results in a working connection. Another option would be to set a password for the root user and use `-p` on the command. --- components/playground/playground.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/playground/playground.go b/components/playground/playground.go index 46115fd9a7..6bcf22872d 100644 --- a/components/playground/playground.go +++ b/components/playground/playground.go @@ -872,7 +872,7 @@ func (p *Playground) bootCluster(ctx context.Context, env *environment.Environme fmt.Println(color.GreenString("CLUSTER START SUCCESSFULLY, Enjoy it ^-^")) for _, dbAddr := range succ { ss := strings.Split(dbAddr, ":") - fmt.Println(color.GreenString("To connect TiDB: mysql --host %s --port %s -u root", ss[0], ss[1])) + fmt.Println(color.GreenString("To connect TiDB: mysql --host %s --port %s -u root -p (no password)", ss[0], ss[1])) } }