1、连接远程的数据库执行 mysql_test用例命令:
./mysql-test-run.pl --extern host=10.8.30.1 --extern port=7788 --extern user=root --extern password='uddbtest7788' show --recordLogging: ./mtr --extern host=10.8.30.1 --extern port=7788 --extern user=root --extern password=uddbtest7788
host :远程服务器地址
port:远程服务器端口
paasswd:连接密码
user:连接用户
2、执行含有uddbtf字符串的测试用例命令:
./mtr --extern host=10.10.182.162 --extern port=7788 --extern user=shard --extern password='123qwe' --force --do-test=.*uddbtf.*
执行报错问题解决:
Can't locate Time/HiRes.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/pt-query-digest line 3187.
BEGIN failed--compilation aborted at /usr/local/bin/pt-query-digest line 3187.
解决方案:
.pm实际上是Perl的包,只需安装如下软件包即可:
yum install -y perl-Time-HiRes