pingcap/tidb-docker-compose

default Default user/password: admin/admin can not login

Closed this issue · 8 comments

i have clone one set pass first time ,the second time ,i ready login,it promt invalid username and password

你是说"第二次"登录就不行了吗? 我好像每次用root就能登录, 不需要password.
比如我这样就可以登录
mysql -h 127.0.0.1 -P 4000 -u root -p --default-character-set=utf8
好像文档里说的默认用户密码admin/admin我也不能用.

如果你设置过密码之后, 又跑了docker-compose down 那保存的数据应该都被清掉了. 再次用docker-compose up 之后会启动新的数据库和配置.

The default user and password is for Grafana, not TiDB. The docker-compose does not set a username and password for TiDB. And the data is persisted into data directory, if not cleaning the data directory, docker-compose up will reuse previous data.

这个Grafana,登录太不靠谱了,我第一次git clone ,登录用admin/admin,提示我修改密码,改了之后,我进去了,过了几个小时回来,不知道什么原因登录不了啦,报用户密码错误,好,我怀疑我是不是密码记错了,不管了,我又将原来的/Users/a/Documents/tidb_workspace/tidb-docker-compose,目录删除掉,重新这个位置git clone,这回重新来,总可以了吧。结果还是不行,它还是报用户密码错误,按3楼的回复,它是将账户密码信息存储在data目录,抱歉,data目录在哪里?难道不应该放到tidb-docker-compose目录下面吗?这种低级问题太奇葩了吧

@yigemaserwang when it prompts you to change the password, you don't have to, you can click "Skip".

@tennix this is a feature of the newer version of Grafana. For docker-compose we can configure the grafan.ini to turn of auth.

Oh, yes it's a new feature of Grafana.
@yigemaserwang What's your OS, the data directory is supposed under tidb-docker-compose directory.

cofyc commented

hi, @yigemaserwang

In the current setup, grafana data is not stored under data directory, and you need to clean docker container (git clone a new directory will not affect docker containers started under the old directory):

docker-compose rm -s -f grafana
docker-compose up -d grafana

I'm going to fix this in #64.