0

I am running a command on mysqlulc> prompt on CMD. The command is as below:-

mysqluc> mysqldbcompare --server1=root:Password1!@host1 --server2=root:Password1!@host2 teststore:teststore --run-all-tests --changes-for=server2 --difftype=sql

I want to redirect the output of this command into a text file. I have tried redirection operator '>' and also the 'INTO FILE' thing but no success. The 'mysqldbcompare' utility is not accepting any other characters at end of the command.

Please help on this.

Thanks in advance!!

Arun
  • 31
  • 6

2 Answers2

2

I have the same problem and solved by run the mysqldbcompare command under the work bench install folder instead of in the mysqluc command window.

In my case, I run the similar command below under D:\MyTool\mysql-workbench-community-6.2.5-winx64-noinstall\MySQL Workbench 6.2.5 CE (winx64)

mysqldbcompare --server1=databaseuser:password@127.0.0.1 --server2=databaseuser:password@10.10.10.10 server1db:server2db --changes-for=server2 -a --difftype=sql >> results.log

Hope it helps.

Chasefornone
  • 747
  • 1
  • 7
  • 15
1

I run this command under Windows 10 elevated command line

"C:\Program Files\MySQL\MySQL Utilities 1.6\mysqldiskusage.exe" --server=user:pass@localhost:3306 dbname > "D:\test.txt"

It should also works with mysqldbcompare.exe

Updated:

"C:\Program Files\MySQL\MySQL Utilities 1.6\mysqldbcompare.exe" --server1=user:pass@host --server2=user:pass@host db1:db2 --changes-for=server2 --run-all-tests --skip-data-check --skip-row-count --skip-table-options --difftype=sql > "D:\test.txt"
sangnandar
  • 47
  • 1
  • 6