my2sql解析mysql8.0.29
# /usr/local/bin/my2sql-user test -password 123123 -host 127.0.0.1 -port 5577-mode repl -work-type 2sql -start-filemysql-bin.000174 -output-dir /u01/tmp/my2sql
context.go:575 Connect mysql failed this user requires mysql native password authent
ication.
# 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.
解决
#mysql配置文件中增加以下配置项并重启
default_authentication_plugin=mysql_native_password {:5_262:}
页:
[1]