Tomas
El Presidente
Just Getting Started
Member Likes (0)
Hi,
I'm trying to figure out how to add a vip-db and use it for a new blog.
The creation and config for the vip-db should not be an issue but how can I set the new blog I create to use this db instead of the default one it will be placed in depending on the md5 of the blog-id.
Let's say I create vip00 db and have this in db-config.php
add_db_server('vip00', 'dc1', 1, 1,'ip.add.re.ss','', 'blogs_vip00', 'user', 'password');
I then manually add a new blog.
How can I set it to use the vip00 db?
Would it be enough to add this to db-config.php
add_vip_blog(9085, 'vip00');
9085 would be the new blogs id.
Hope I'm making sense ;)
Thanks

Responses (7)
People Person (joined February 2012) Likes (0)
Tomas,
I've flagged the developer to come by and give you some feedback on this one :)
Databases are tricky stuff, I'd rather him give you the answers that you need then someone try to guess :)
Best,
Kimberly
Developer (joined June 2008) Likes (0)
You have to do the following
1. Create your VIP db and set it up so multi-db knows about it.
2. If you want a new blog in there, then create the blog, other wise find the I'd of the blog you want to move to the VIP and the database it is in.
3. This step depends on your level of MySQL access, but the easiest thing to do is to export the tables for the blog you want to move to the VIP db and then import them into the VIP db
4. Set the db config to assign the blog Id to be in the new VIP db.
No easy method I'm afraid.
Member (joined December 2010) Likes (0)
Thanks Barry, that sounds like a plan
1) Create the blog
2) Setup the vip db
3) export/import the blogs table
4) configure db-config.php
So just a last question, this should go into db-config.php if I wan't to have the db as blogs_vip00 ?
Developer (joined June 2008) Likes (0)
Yep, that looks ok - though I tend to duplicate the ip in my add_db calls rather than leave the second one as '', you shouldn't need to - just a habit I've gotten into :)
Member (joined December 2010) Likes (0)
Many thanks, will run this weekend
Tomas
Support Kangaroo (joined March 2011) Likes (0)
Greetings Tomas,
Please advise if this issue is now resolved.
Thank you for being a WPMU Dev Member!
Cheers, Joe
Member (joined December 2010) Likes (0)
Yes, sorry. Resolved :)
Become a member