MySQL Find and Replace (REPLACE)

MySQL Find and Replace (REPLACE)

Have you ever had the need to do a MySQL find and replace to quickly replace some data in your database? Fear not, MySQL has a nifty little string function, REPLACE, that allows a user to find and replace instances of a search string with a substitution string.

[ Read More ]

Restore a WordPress Database to Localhost

Restore a WordPress Database to Localhost

Working with WordPress, I often will take a production database and restore it to my local server to verify changes and further aid in development. When doing so, I will always run WordPress under a named virtual host, with frequent production backups allowing me to mimic the production environment. This article will discuss the steps necessary to backup and restore a production MySQL database to a local development environment, and configure it to run against a local named virtual host or URL.

[ Read More ]

MySQL Client Debugging Using the General Query Log

MySQL Client Debugging Using the General Query Log

I was recently working on a project at work and needed to do some debugging on a local environment of the queries being executed against a MySQL database from the application I was working on. To accomplish this, I used the MySQL general query log, and wanted to share how to enable and configure the general query log.

[ Read More ]