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 

Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts