GreatSQL社区

搜索

[已解决] my2sql解析mysql8.0.29

696 2 2022-9-2 09:41
[root@ghdb01 binlog]# /usr/local/bin/my2sql  -user test -password 123123 -host 127.0.0.1 -port 5577  -mode repl -w
ork-type 2sql -start-file  mysql-bin.000174 -output-dir /u01/tmp/my2sql
[2022/09/02 09:35:33] [fatal] context.go:575 Connect mysql failed this user requires mysql native password authent
ication.
[root@ghdb01 binlog]# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 459564
Server version: 8.0.29 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

[root@mysql.sock][(none)]> select * from mysql.user where user='test'\G
*************************** 1. row ***************************
                    Host: localhost
                    User: test
             Select_priv: Y
             Insert_priv: Y
             Update_priv: Y
             Delete_priv: Y
             Create_priv: Y
               Drop_priv: Y
             Reload_priv: Y
           Shutdown_priv: Y
            Process_priv: Y
               File_priv: Y
              Grant_priv: N
         References_priv: Y
         ...
              ssl_cipher: 0x
             x509_issuer: 0x
            x509_subject: 0x
           max_questions: 0
             max_updates: 0
         max_connections: 0
    max_user_connections: 0
                  plugin: mysql_native_password
   authentication_string: *E56A114692FE0DE073F9A1DD68A00EEB9703F3F1
        password_expired: N
   password_last_changed: 2022-09-02 09:28:45
       password_lifetime: NULL
          account_locked: N
        Create_role_priv: Y
          Drop_role_priv: Y
  Password_reuse_history: NULL
     Password_reuse_time: NULL
Password_require_current: NULL
         User_attributes: NULL
1 row in set (0.00 sec)


mysql8.0.29中使用my2sql解析binlog,建立mysql_native_password密码认证方式用户,仍然提示Connect mysql failed this user requires mysql native password authentication.

全部回复(2)
Yangzy 2022-9-2 09:44:38
解决
#mysql配置文件中增加以下配置项并重启
default_authentication_plugin=mysql_native_password
admin 2022-9-2 17:21:41
Yangzy

8

主题

0

博客

35

贡献

注册会员

Rank: 2

积分
57

助人为乐(铜)

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-10-18 19:28 , Processed in 0.022209 second(s), 17 queries , Redis On.
快速回复 返回顶部 返回列表