我正在尝试使用该mysqldbcompare工具,但收到连接错误:
$ mysqldbcompare --server1=client --skip-data-check db1:db2
# server1 on <ip>: ...
ERROR: Access denied for user 'root'@'<ip>' (using password: YES)
Run Code Online (Sandbox Code Playgroud)
不过,我可以使用mysql和连接.我设置我的信用卡mysql_config_editor --host=<ip> --user=root --port=3306 --password并使用mysql命令测试,包括和不传递所有args(mysql -u root -p -h <ip> -P 3306).
我检查了服务器的绑定地址,并查看了服务器错误日志,但它只是重申了连接被拒绝的消息.我在线搜索(以及SO),但一直找不到任何东西.
任何帮助表示赞赏.
以下命令失败
mysqldbcompare --server1=un:pw@server1 --server2=un:pw@server2 --difftype=sql store-staging:store-beta
Run Code Online (Sandbox Code Playgroud)
出现以下错误:
mysqldbcompare:错误:无法解析指定的数据库:'store-staging:store-beta'.请验证是否以有效格式指定了数据库(即db1 [:db2]),并在需要时正确使用了反引号.如果将非字母数字字符用于数据库名称,则需要使用反引号.解析指定的数据库会导致db1 ='store'和db2 ='store'.
我的问题是如何"逃避"模式,以便它们可以作为此命令的一部分运行?
我尝试了以下所有方法:
'store-staging:store-beta'
"store-staging:store-beta"
`store-staging:store-beta`
'store-staging':'store-beta'
"store-staging":"store-beta"
`store-staging`:`store-beta`
Run Code Online (Sandbox Code Playgroud)
他们都失败了.