MyBB Community Forums

Full Version: Change table prefix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When install mybb, i don't user table prefix (leave blank). Now, is there any way to convert all table to new prefix, without manual rename all tables (68 T_T), because i set up a new homepage, using the same database. Undecided
RENAME TABLE `147_adminlog` TO `mybb_adminlog`;
RENAME TABLE `147_adminoptions` TO `mybb_adminoptions`;
RENAME TABLE `147_adminsessions` TO `mybb_adminsessions`;
RENAME TABLE `147_adminviews` TO `mybb_adminviews`;
[...]

Just do the same with the other tables. If you write them all up in a wordpad file, you can import all of them to run at once.

Remember to change the values to your own information, and change the database prefix in ./inc/config.php too.