mysql+safe+mode关闭_mysql-safe mode in TiDB or something like that

本文探讨了在使用Docker部署TiDB集群时遇到的问题:忘记root密码导致无法连接数据库。作者尝试了多种方法,包括使用-skip-grant-table参数启动TiDB服务器,但在Docker环境下操作受限。寻求有效方案实现类似MySQL的mysqld-safemode功能。

I created a TiDB cluster with Docker, not Docker Compose. When I tested the TiDB account, I changed the root password, and then I had no way to connect to my cluster database.

We all know that there is mysqld-safe mode in MySQL to skip the grant table for passwordless login. Then in the TiDB cluster, what method should be used for the same or similar operations?

Of course, the way I found in the TiDB FAQ is to close the TiDB server and run it with the parameter ‘-skip-grant-table=true’. But unfortunately, this way in the cluster of docker deployment, I can only delete the TiDB container and then run a new container. This way I rerun the TiDB and can't even run.

I don't know how to do it, I look forward to your answer!!

我用 Docker 创建了 TiDB 集群,不是 Docker Compose。在我测试 TiDB 帐号的时候,我修改了root的密码,然后我就没有任何办法连接到我的集群数据库了。

我们都知道在mysql中有mysqld-safe mode 来跳过grant table进行无密码登录。那我在 TiDB 集群中,应该使用什么方式进行同样的或类似的操作。

当然我在 TiDB 的 FAQ 中找到的方法是,关闭 TiDB server,然后带参数,‘-skip-grant-table=true’运行。但遗憾的是,这种方式在 Docker 部署的聚群中,我只能删除 TiDB 容器,然后运行一个新的容器。这样我重新run的 TiDB 甚至无法运行。

我已经不知道我该如何做了,期待你的回答!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值