MySQL Differ is a purely PHP-driven MySQL diff utility; It creates emulated databases for two imported ones and compares them without using an actual database.
MySQL Differ can be used in a few different ways.
- You can Embed the Module into your own site for convenience.
- You can use the Online SQL Diff Utility below directly from your browser, without having to download anything or write any code.
- You can use the Webservice API to diff your tables from your own server.
- You can Download the Source for use in your personal projects.
Online SQL Diff Utility
You may import your databases or tables by SQL file, text, or direct database connection. MySQL Differ will emulate a table structure for each table and compare the two of them. MySQL Differ will provide a visual and verbose explanation of the differences as well as give you the MySQL to sync/update the second table.
Because MySQL Differ relies on an emulated schema structure, it does not require database access to run (though, you can use it if you really want to), and because it doesn't require database access, it works well as an online tool that you don't have to download.
Embed the Module
If you are so inclined, you can embed the tool you see above into your own website by adding the following markup to your page.
<iframe src="http://sqldiff.geneticcoder.com/api.php" style="overflow-x: hidden; width:97%; max-width:97%; margin:0 auto; min-height:35em; border:0;"></iframe>
Yes, there's an API too. Here's a short list of endpoints.
|Get an exported object from SQL string|
|Get an exported object from database|
|Diff two exported schemas.|
Download the Source
You can download a zip containing the complete source code, including the API, widget, and library files.Download MySQLDiffer
This library implements the PHP-SQL-Parser library.
Apache Lic. 2.0. You may not resell or redistribute, for personal use only. No warranties implied or implicit. Use at your own risk.
Note: the PHP-SQL-Parser library is included in this package. See the link above for licensing info.
All rights reserved. © Rob Parham 2015