Change A My Sql Database Prefix

Posted By Weston Ganger

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

Article Topic:Software Development - Linux

Date:June 07, 2014