Go Back   Web Server Hosting Forum by BODHost > Support > MySQL Issues.
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-20-09, 23:24
BOD Member
 
Join Date: Jun 2009
Posts: 57
Default Split a mysql database?

Guys, I need your help. I'm moving over some database backups from a site that I had a while back. The problem is, it's a single database that holds both a Wordpress blog and a forum (mybb). It's in a single database because my host at the time only allowed us one, but now I want to keep my databases separate. Can I split the database down, one for the blog and one for the forum?
Reply With Quote
  #2 (permalink)  
Old 06-21-09, 00:25
BOD Member
 
Join Date: Jun 2009
Posts: 65
Default

If the blog and forum use different table prefixes (and they probably do), then splitting the database is easy. Simply do the following:

1. Go to phpMyAdmin, and select the database you want to modify.
2. Click Export.
3. In the export box, select the database tables for the blog (Wordpress usually uses the wp_ suffix). Make sure the SQL radio button is selected.
4. Scroll down and check the "Save as file" checkbox. Give the file a name, select compression type, then click Go.

And that's it. Just repeat the process for the forum tables.
Reply With Quote
  #3 (permalink)  
Old 06-21-09, 07:33
BOD Member
 
Join Date: Jun 2009
Posts: 57
Default

Thanks, it looks like I was able to split it up. How do you put the file you downloaded into a new database, though? Do I have to create new ones?
Reply With Quote
  #4 (permalink)  
Old 07-09-09, 12:53
BOD Member
 
Join Date: Jul 2009
Posts: 50
Default

I'm 99% sure that in your case, it's as simple as creating the new database and running a query with the output from the export. If you do create a file with the exported data, as gazzie suggests, you should be able to click the Import link in PhpMyAdmin and simply select the file containing the database.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 10:08.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2010, BODHost Ltd. All rights reserved.