我有两个想要运行diff的mysql数据库,我想连接的用户(root)有一个密码。
当我使用mysqldiff文档here中给出的命令时:
mysqldiff --server1=root@localhost --server2=root@localhost --difftype=sql old_db:db_brand_new
我收到错误消息,说我的命令未经授权。
我尝试过普通-p
开关的变体,但它不起作用
如何验证mysqldiff
命令?
答案 0 :(得分:1)
您链接的文档说:
--server1=<source>
Connection information for the first server in the format: <user>[:<passwd>]@<host>[:<port>][:<socket>] or <login-path>[:<port>][:<socket>].
--server2=<source>
Connection information for the second server in the format: <user>[:<passwd>]@<host>[:<port>][:<socket>] or <login-path>[:<port>][:<socket>].
所以你可以试试 mysqldiff --server1 = root:[YOURPASSWORDHERE] @localhost --server2 = root:[YOURPASSWORDHERE] @localhost --difftype = sql old_db:db_brand_new