How To Change A My Sql Database Prefix

Posted by Weston Ganger on June 07, 2014

First Backup your Database:

mysqldump -u root -p yourDatabaseName > dumpFileName.sql

Then create a copy of that file and edit it in VIM or your favourite editor:

Search and replace your prefix with the one you want, then Save

Then restore your updated database:

mysqldump -u root -p yourDatabaseName < dumpFileName.sql

Lastly be sure to update your application with the new prefix name, for wordpress this is wp-config.php

Posted in Linux and Tagged with mysql 

Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts