How To 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

Recommended Posts



Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected