Download the PHP package mamchenkov/mysql-find-and-replace without Composer
On this page you can find all versions of the php package mamchenkov/mysql-find-and-replace. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mamchenkov/mysql-find-and-replace
More information about mamchenkov/mysql-find-and-replace
Files in mamchenkov/mysql-find-and-replace
Package mysql-find-and-replace
Short Description Find and replace tool for MySQL
License GPL-2.0
Homepage https://github.com/mamchenkov/MySQL-FindAndReplace
Informations about the package mysql-find-and-replace
MySQL find and replace
NOTE There is a better way now - use interconnectit/Search-Replace-DB. It has verbosity control, collation converter and works both with command line and web interface. It's just better.
This script performs a find and replace operation across all fields, of all tables in a specified MySQL database. On top of regular fields, it also processes serialized values.
This code is heavily based on MySQL search and replace script written by David Coveney, and he deserves all the credit. The original script is here:
http://davidcoveney.com/782/mysql-database-search-replace-with-serialized-php/
My changes so far are:
- CLI, not web based. In the future, it will support both environments.
- Fail on any MySQL error. Original code was just printing out the message.
- Run-time configuration through CLI options
- Lots of coding style changes (work in progress).
- Composer installer
Install
Install with composer like so:
Usage
Always, always, always backup your database before usage:
Run the script like so:
All versions of mysql-find-and-replace with dependencies
ext-mysqli Version *