使用ogg 19无法登录 tidb 3.6

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:3.6
  • 【问题描述】:使用ogg 19无法登录 tidb 3.6

GGSCI (zy-y8-kk-test-yace07) 16> dblogin sourcedb test@172.18.3.208:4000 userid oggadmin password xxx 2019-12-15 20:36:36 WARNING OGG-00769 MySQL Login failed: . SQL error (1045). Access denied for user ‘oggadmin’@‘172.18.3.208’ (using password: NO). ERROR: Failed to connect to MySQL database engine for HOST 172.18.3.208, DATABASE test, USER oggadmin, PORT 4000.

ogg账号权限没有任何问题 [root@zy-y8-kk-test-yace07 ~]# mysql -u oggadmin -p -P4000 -h172.18.3.208 Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 45878 Server version: 5.7.25-TiDB-3.0.6 MySQL Community Server (Apache License 2.0)

Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MySQL [(none)]>

确认一下该用户是否有 test 库的权限。另外需要在源端 mgr 增加允许访问目标端 ip 的规则 edit params mgr 增加以下内容: ACCESSRULE, PROG *, IPADDR *, ALLOW

源端是 mysql, 目标端是 tidb。我是在目标端上登录tidb 不行啊。难道我理解有问题。我先看看你的建议,谢谢!

image

依然不行啊

发现一个问题,在源端使用mysql 客户端 (8.18) 无法连接目标端 tidb, 报错tidb log 提示:

2019/12/16 01:49:01.181 +08:00] [INFO] [server.go:413] [“new connection”] [conn=46755] [remoteAddr=172.18.3.208:6124] [2019/12/16 01:49:01.354 +08:00] [INFO] [server.go:416] [“connection closed”] [conn=46753] [2019/12/16 01:49:04.253 +08:00] [INFO] [server.go:416] [“connection closed”] [conn=46755] [2019/12/16 01:49:23.960 +08:00] [INFO] [client_batch.go:591] [“recycle idle connection”] [target=172.18.3.209:20160] [2019/12/16 01:49:31.819 +08:00] [ERROR] [session.go:1394] [“user connection verification failed”] [user=oggadmin@172.18.3.92] [stack=“github.com/pingcap/tidb/session.(*session).Auth\ \t/home/jenkins/agent/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/session/session.go:1394\ngithub.com/pingcap/tidb/server.(*TiDBContext).Auth\ \t/home/jenkins/agent/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:285\ngithub.com/pingcap/tidb/server.(*clientConn).openSessionAndDoAuth\ \t/home/jenkins/agent/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:569\ngithub.com/pingcap/tidb/server.(*clientConn).readOptionalSSLRequestAndHandshakeResponse\ \t/home/jenkins/agent/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:532\ngithub.com/pingcap/tidb/server.(*clientConn).handshake\ \t/home/jenkins/agent/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:170\ngithub.com/pingcap/tidb/server.(*Server).onConn\ \t/home/jenkins/agent/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:404”]

MySQL 8.0 默认的密码验证方式是: caching_sha2_password 之前版本默认的方式是: mysql_native_password 建议使用低版本 OGG 和 MySQL Client 再尝试一下。

问题视乎更近了一步,谢谢楼上:
tidb 版本 3.6
ogg 降级为12.1

报错如下:

请问TIDB3.6这个设置lower_case_table_names怎么改

https://pingcap.com/docs-cn/v3.1/reference/configuration/tidb-server/configuration-file/#lower-case-table-names

找到tidb节点的 tidb.toml 文件,添加以下参数就好了。

tidb>$ more tidb.toml
lower-case-table-names = 1

使用OGG同步记得不要使用严格模式,除非你的数据都是符合严格模式,否则会出现丢失数据的情况。

可以写个文档记录一下,:+1:

有文档分享吗。最近就是搞这个,发现很麻烦

:+1::+1::+1:

lower_case_table_names 这个参数更改后要重启TIDB吗??

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。