Using MultiDB using manual setup


We are test to using multidb rightnow.

The strategy is to shard more than 72000 blogs. 10000 blog IDs/one database. For 72000 IDs, so we have 9 databases.

1 global databases. 8 blogs databases.

We’re using RDS from amazon. 1 multiaz for global + blog ID’s 1-10000.

2 RDS for the others. Let say we separated the others blogs in a half each other.

I prefer dont use move-blog.php for the migration process. Because the data have been separated like strategy above. So, i need to set up and db-config the database to match our needs.

I have try to manually put the db-config like this:

define ('DB_SCALING', '16');
add_dc_ip('', 'dc1');

// Note: you can also place this section in a file called db-list.php in wp-content
add_db_server('global', 'dc1', 1, 1,'','', 'dgdgdg', 'dbdgdgdg', '#');
add_db_server('0', 'dc1', 1, 1,'','', 'dgdgdg_1', 'dbdgdgdg', '#');
add_db_server('1', 'dc1', 1, 1,'','', 'dgdgdg2_2', 'dbdgdgdg', '#');
add_db_server('2', 'dc1', 1, 1,'','', 'dgdgdg2_3', 'dbdgdgdg', '#');
add_db_server('3', 'dc1', 1, 1,'','', 'dgdgdg2_4', 'dbdgdgdg', '#');
add_db_server('4', 'dc1', 1, 1,'','', 'dgdgdg2_5', 'dbdgdgdg', '#');
add_db_server('5', 'dc1', 1, 1,'','', 'dgdgdg3_6', 'dbdgdgdg', '#');
add_db_server('6', 'dc1', 1, 1,'','', 'dgdgdg3_7', 'dbdgdgdg', '#');
add_db_server('7', 'dc1', 1, 1,'','', 'dgdgdg3_8', 'dbdgdgdg', '#');

The setting above give me error, db-config coludn’t find the global database.

Let me know if i do some wrong there.

**Some info striped and change in the codes, for security reason.