- 二、测试不同端口模式
- 环境描述:
- 版本:GreatSQL 8.0.32-26,openeuler 22.03 TLS SP4
- 10.1.30.137 主库,3306
- 10.1.30.138 从库,3307
- --从这里可以看到137 可以通过root正常登陆
- [root@mysqldb1 ~]# mysql -uroot -p'vUdqtDE7n.8b' -h10.1.30.137 -P3306
- mysql: [Warning] Using a password on the command line interface can be insecure.
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 509
- Server version: 8.0.32-26 GreatSQL, Release 26, Revision a68b3034c3d
- Copyright (c) 2021-2024 GreatDB Software Co., Ltd
- Copyright (c) 2009-2024 Percona LLC and/or its affiliates
- Copyright (c) 2000, 2024, 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@mysqldb1 22:12: [(none)]> select * from mysql.dsns;
- +----+-----------+----------------------------------------------+
- | id | parent_id | dsn |
- +----+-----------+----------------------------------------------+
- | 1 | NULL | h=10.1.30.138,P=3307,u=root,p='vUdqtDE7n.8b' |
- +----+-----------+----------------------------------------------+
- 1 row in set (0.00 sec)
- --从这里可以看到138 可以通过root正常登陆,且是3307端口
- [root@mysqldb1 ~]# mysql -uroot -p'vUdqtDE7n.8b' -P3307 -h10.1.30.138
- mysql: [Warning] Using a password on the command line interface can be insecure.
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 11
- Server version: 8.0.32-26 GreatSQL, Release 26, Revision a68b3034c3d
- Copyright (c) 2021-2024 GreatDB Software Co., Ltd
- Copyright (c) 2009-2024 Percona LLC and/or its affiliates
- Copyright (c) 2000, 2024, 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@mysqldb1 22:13: [(none)]> exit
- Bye
- --在137上执行,这里就报错了:看起来像是用户密码验证不对。
- pt-table-checksum \
- > --replicate=mysql.checksums \
- > --nocheck-replication-filters \
- > --no-check-binlog-format \
- > --host=10.1.30.137 \
- > --port=3306 \
- > --user=root \
- > --password='vUdqtDE7n.8b' \
- > --databases=businessex \
- > --recursion-method dsn=h=10.1.30.137,D=mysql,t=dsns
- Checking if all tables can be checksummed ...
- Starting checksum ...
- 10-05T22:12:39 DBI connect(';host=10.1.30.138;port=3307;mysql_read_default_group=client','root',...) failed: Access denied for user 'root'@'10.1.30.137' (using password: YES) at /usr/local/percona-toolkit-3.6.0/bin/pt-table-checksum line 1639.
复制代码 |