mysqldump --skip-comments --no-data -u your_user1 -p your_database_name1 > file_1.sql mysqldump --skip-comments --no-data -u your_user2 -p your_database_name2 > file_2.sql diff file_1.sql file_2.sqlNote that the first two lines may end up being identical except for the .sql file name at the end of the command (because databases that you want to compare often exist in independent environments). For example, you might run the first command locally and the second on a remote dev machine. In both instances your user may be root and your database name might be the name of your project. If you run the first command on your local machine and the second on a remote, you'll have to scp file_2.sql to your local machine before running the diff command. Enjoy!
Wednesday, March 6, 2013
How can I determine the differences between two MySQL databases?
Subscribe to:
Post Comments (Atom)
About Me
- John Erck
- I code. I figured I should start a blog that keeps track of the many questions and answers that are asked and answered along the way. The name of my blog is "One Q, One A". The name describes the format. When searching for an answer to a problem, I typically have to visit more than one site to get enough information to solve the issue at hand. I always end up on stackoverflow.com, quora.com, random blogs, etc before the answer is obtained. In my blog, each post will consist of one question and one answer. All the noise encountered along the way will be omitted.
Blog Archive
-
▼
2013
(49)
-
▼
March
(19)
- How do I enable or disable an apache virtual host?
- How do I list all running processes and the amount...
- What's the best tutorial for getting set up with r...
- What's the quickest way to install homebrew on Mac...
- What's the easiest way to get the latest version o...
- How do I install a command line tool after uncompr...
- How do I uncompress a tarball?
- How do I get and install a trusted SSL cert on a l...
- What's the purpose of each directory in a standard...
- When I create a new file or folder, what determine...
- When I create a new file or folder, what determine...
- How do I make it so all future files and dirs have...
- How do I make it so all future files and dirs have...
- What does PHP's print_r($_FILES) look like?
- How do I increase PHP's resource limits?
- What does PHP's getimagesize function return?
- How can I add an existing user to an existing grou...
- How can I determine the differences between two My...
- How do I search multiple files for a specific word...
-
▼
March
(19)
No comments:
Post a Comment