Page 1 of 1

how to use multiple databases instead of one

Posted: Thu May 05, 2005 1:09 pm
by sallam
Greetings!

I hope someone can help me make a modification which would make the forum software that I'm using, IPB (invision board), able to use multiple databases instead of just 1. This will be very useful for me and all those who have a big database. I'm moving into a host who requires that a database shouldn't exceed 200MB, but allows unlimited databases. In addition, I've experienced many problems, specially when doing backups, restoring, or switching servers. It also comes handy when your host puts a max limit to the number of records/queries a database user can make per hour.

The bulkiest table is called ibf_posts, so perhaps the mod I'm after allows this table to go into its own database, or better still, allows the splitting of ibf_posts table into 2 or more tables, each in their own database.

So what I need is to tell the forum script (IPB) to use different database(s) when handling posts.

I'm not a coder, but with the help of phpmyadmin, I can move a table into a new database, but I don't know how to split the posts table into 2 or more, before moving each to a separate databse. I'm also able to use UltraEdit if that is required. Any advises for that is much appreciated.

Many thanks in advance.

Here is a copy of the config_global.php that the forum uses:

Code: Select all

<?php
$INFO['admin_group']			=	'4';
$INFO['allow_creator_vote']			=	'1';
$INFO['allow_dup_email']			=	'0';
$INFO['allow_dynamic_img']			=	'0';
$INFO['allow_flash']			=	'1';
$INFO['allow_images']			=	'1';
$INFO['allow_online_list']			=	'0';
$INFO['allow_search']			=	'1';
$INFO['allow_skins']			=	'1';
$INFO['au_cutoff']			=	'15';
$INFO['auth_group']			=	'1';
$INFO['avatar_def']			=	'64x64';
$INFO['avatar_dims']			=	'64x64';
$INFO['avatar_ext']			=	'gif|jpeg|jpg|swf|png';
$INFO['avatar_url']			=	'1';
$INFO['avatars_on']			=	'1';
$INFO['avup_size_max']			=	'20';
$INFO['ban_email']			=	'';
$INFO['ban_ip']			=	'';
$INFO['ban_names']			=	'';
$INFO['base_dir']			=	'/home/username/public_html/forums/';
$INFO['board_desc']			=	'';
$INFO['board_name']			=	'forum name';
$INFO['board_offline']			=	'0';
$INFO['board_start']			=	'1098651909';
$INFO['board_url']			=	'http://forums.domain.com';
$INFO['boardname']			=	'forum rname';
$INFO['bot_antispam']			=	'0';
$INFO['clock_joined']			=	'j-F y';
$INFO['clock_long']			=	'M j Y, h:i A';
$INFO['clock_short']			=	'jS F Y - h:i A';
$INFO['cookie_domain']			=	'';
$INFO['cookie_id']			=	'';
$INFO['cookie_path']			=	'';
$INFO['custom_profile_topic']			=	'0';
$INFO['debug_level']			=	'1';
$INFO['disable_admin_anon']			=	'0';
$INFO['disable_gzip']			=	'0';
$INFO['disable_online_ip']			=	'0';
$INFO['disable_reportpost']			=	'0';
$INFO['display_max_posts']			=	'15';
$INFO['display_max_topics']			=	'15';
$INFO['email_footer']			=	'';
$INFO['email_header']			=	'This email generated via forum rname';
$INFO['email_in']			=	'email_address';
$INFO['email_out']			=	'email_address';
$INFO['emo_per_row']			=	'3';
$INFO['etfilter_punct']			=	'0';
$INFO['etfilter_shout']			=	'0';
$INFO['flood_control']			=	'30';
$INFO['force_login']			=	'0';
$INFO['forum_skin_1']			=	'';
$INFO['forum_skin_8']			=	'';
$INFO['gd_font']			=	'/home/username/public_html/forums/fonts/progbot.ttf';
$INFO['gd_height']			=	'70';
$INFO['gd_width']			=	'250';
$INFO['gl_link']			=	'';
$INFO['gl_show']			=	'1';
$INFO['gl_title']			=	'Forum Rules';
$INFO['guest_group']			=	'2';
$INFO['guest_name_pre']			=	'Guest_';
$INFO['guests_ava']			=	'1';
$INFO['guests_img']			=	'1';
$INFO['guests_sig']			=	'1';
$INFO['header_redirect']			=	'location';
$INFO['home_name']			=	'';
$INFO['home_url']			=	'http://forums.domain.com';
$INFO['hot_topic']			=	'15';
$INFO['html_dir']			=	'/home/username/public_html/forums/html/';
$INFO['html_url']			=	'http://forums.domain.com/html';
$INFO['img_ext']			=	'gif|jpeg|jpg|png';
$INFO['index_news_link']			=	'1';
$INFO['installed']			=	'1';
$INFO['load_limit']			=	'';
$INFO['match_browser']			=	'0';
$INFO['max_emos']			=	'20';
$INFO['max_h_flash']			=	'200';
$INFO['max_images']			=	'10';
$INFO['max_interest_length']			=	'50000';
$INFO['max_location_length']			=	'50000';
$INFO['max_messages']			=	'50';
$INFO['max_post_length']			=	'1000';
$INFO['max_sig_length']			=	'50000';
$INFO['max_w_flash']			=	'200';
$INFO['member_group']			=	'3';
$INFO['min_search_word']			=	'';
$INFO['msg_allow_code']			=	'1';
$INFO['msg_allow_html']			=	'0';
$INFO['new_reg_notify']			=	'0';
$INFO['news_forum_id']			=	'1';
$INFO['no_au_forum']			=	'0';
$INFO['no_au_topic']			=	'0';
$INFO['no_reg']			=	'0';
$INFO['nocache']			=	'1';
$INFO['number_format']			=	'none';
$INFO['offline_msg']			=	'';
$INFO['php_ext']			=	'php';
$INFO['post_titlechange']			=	'50000';
$INFO['pre_moved']			=	'Moved: ';
$INFO['pre_pinned']			=	'Pinned: ';
$INFO['pre_polls']			=	'Poll: ';
$INFO['print_headers']			=	'0';
$INFO['reg_auth_type']			=	'user';
$INFO['safe_mode_skins']			=	'0';
$INFO['search_post_cut']			=	'';
$INFO['session_expiration']			=	'3600';
$INFO['short_forum_jump']			=	'0';
$INFO['show_active']			=	'1';
$INFO['show_birthdays']			=	'0';
$INFO['show_img_upload']			=	'1';
$INFO['show_totals']			=	'1';
$INFO['show_user_posted']			=	'1';
$INFO['sig_allow_html']			=	'0';
$INFO['sig_allow_ibc']			=	'1';
$INFO['sp_Archive_org']			=	'Archive.org';
$INFO['sp_google']			=	'GoogleBot';
$INFO['sp_inktomi']			=	'Hot Bot';
$INFO['sp_jeeves']			=	'Ask Jeeves';
$INFO['sp_lycos']			=	'Lycos';
$INFO['sp_wuseek']			=	'What U Seek';
$INFO['spider_active']			=	'1';
$INFO['spider_anon']			=	'';
$INFO['spider_group']			=	'2';
$INFO['spider_sense']			=	'1';
$INFO['spider_suit']			=	'';
$INFO['spider_visit']			=	'0';
$INFO['sql_database']			=	'databse_name';
$INFO['sql_debug']			=	'0';
$INFO['sql_driver']			=	'mySQL';
$INFO['sql_host']			=	'localhost';
$INFO['sql_pass']			=	'password';
$INFO['sql_port']			=	'';
$INFO['sql_tbl_prefix']			=	'ibf_';
$INFO['sql_user']			=	'username';
$INFO['strip_space_chr']			=	'0';
$INFO['time_offset']			=	'0';
$INFO['upload_dir']			=	'/home/username/public_html/forums/uploads';
$INFO['upload_url']			=	'http://forums.domain.com/uploads';
$INFO['use_mail_form']			=	'1';
$INFO['use_ttf']			=	'1';
$INFO['validate_day_prune']			=	'10';
$INFO['warn_gmod_ban']			=	'0';
$INFO['warn_gmod_day']			=	'3';
$INFO['warn_gmod_modq']			=	'0';
$INFO['warn_gmod_post']			=	'1';
$INFO['warn_max']			=	'10';
$INFO['warn_min']			=	'0';
$INFO['warn_mod_ban']			=	'0';
$INFO['warn_mod_day']			=	'3';
$INFO['warn_mod_modq']			=	'0';
$INFO['warn_mod_post']			=	'1';
$INFO['warn_on']			=	'1';
$INFO['warn_past_max']			=	'0';
$INFO['warn_protected']			=	',4,13,';
$INFO['warn_show_own']			=	'1';
$INFO['warn_show_rating']			=	'0';
?>

Posted: Thu May 05, 2005 2:29 pm
by hawleyjr
I would export the data into a CSV split it in half and do two seperate LOCAL INFILE Inserts...:)

Out of curiosity how many records are you talking about?

Posted: Thu May 05, 2005 2:48 pm
by sallam
about 190,000 records.
Can you please detail a bit more? I'm not familiar with those terms.

Posted: Thu May 05, 2005 2:52 pm
by hawleyjr