wordpress、dedecms和discuz的数据库表结构及其配置文件

1.wordpress数据库
配置文件为根目录wp-config.php
mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| dedecmsv57utf8sp1 |
| mysql |
| performance_schema |
| wp |
+——————–+
7 rows in set (0.00 sec)

mysql> use wp;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+————————–+
| Tables_in_wp |
+————————–+
| wp_commentmeta |
| wp_comments |
| wp_links |
| wp_mobilepress |
| wp_ngg_album |
| wp_ngg_gallery |
| wp_ngg_pictures |
| wp_options |
| wp_postmeta |
| wp_posts |
| wp_statistics_exclusions |
| wp_statistics_pages |
| wp_statistics_useronline |
| wp_statistics_visit |
| wp_statistics_visitor |
| wp_term_relationships |
| wp_term_taxonomy |
| wp_terms |
| wp_usermeta |
| wp_users |
+————————–+
23 rows in set (0.00 sec)

mysql> exit;

2.dedecms数据库
配置文件为include/common.inc.php
mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| dedecmsv57utf8sp1 |
| mysql |
| performance_schema |
| wp |
+——————–+
7 rows in set (0.00 sec)

mysql> show tables;
+——————————+
| Tables_in_dedecmsv57utf8sp1 |
+——————————+
| dede_addonarticle |
| dede_addonimages |
| dede_addoninfos |
| dede_addonshop |
| dede_addonsoft |
| dede_addonspec |
| dede_admin |
| dede_admintype |
| dede_advancedsearch |
| dede_arcatt |
| dede_arccache |
| dede_archives |
| dede_arcmulti |
| dede_arcrank |
| dede_arctiny |
| dede_arctype |
| dede_area |
| dede_channeltype |
| dede_co_htmls |
| dede_co_mediaurls |
| dede_co_note |
| dede_co_onepage |
| dede_co_urls |
| dede_diyforms |
| dede_dl_log |
| dede_downloads |
| dede_erradd |
| dede_feedback |
| dede_flink |
| dede_flinktype |
| dede_freelist |
| dede_homepageset |
| dede_keywords |
| dede_log |
| dede_member |
| dede_member_company |
| dede_member_feed |
| dede_member_flink |
| dede_member_friends |
| dede_member_group |
| dede_member_guestbook |
| dede_member_model |
| dede_member_msg |
| dede_member_operation |
| dede_member_person |
| dede_member_pms |
| dede_member_snsmsg |
| dede_member_space |
| dede_member_stow |
| dede_member_stowtype |
| dede_member_tj |
| dede_member_type |
| dede_member_vhistory |
| dede_moneycard_record |
| dede_moneycard_type |
| dede_mtypes |
| dede_multiserv_config |
| dede_myad |
| dede_myadtype |
| dede_mytag |
| dede_payment |
| dede_plus |
| dede_plus_changyan_importids |
| dede_plus_changyan_insertids |
| dede_plus_changyan_setting |
| dede_purview |
| dede_pwd_tmp |
| dede_ratings |
| dede_scores |
| dede_search_cache |
| dede_search_keywords |
| dede_sgpage |
| dede_shops_delivery |
| dede_shops_orders |
| dede_shops_products |
| dede_shops_userinfo |
| dede_softconfig |
| dede_sphinx |
| dede_stepselect |
| dede_sys_enum |
| dede_sys_module |
| dede_sys_set |
| dede_sys_task |
| dede_sysconfig |
| dede_tagindex |
| dede_taglist |
| dede_uploads |
| dede_verifies |
| dede_vote |
| dede_vote_member |
+——————————+
90 rows in set (0.01 sec)

mysql> exit;

3.discuz数据库
配置文件位于config目录,分别是config_global.php和config_ucenter.php
mysql> show tables;
+———————————–+
| Tables_in_discuz |
+———————————–+
| pre_common_admincp_cmenu |
| pre_common_admincp_group |
| pre_common_admincp_member |
| pre_common_admincp_perm |
| pre_common_admincp_session |
| pre_common_admingroup |
| pre_common_adminnote |
| pre_common_advertisement |
| pre_common_advertisement_custom |
| pre_common_banned |
| pre_common_block |
| pre_common_block_favorite |
| pre_common_block_item |
| pre_common_block_item_data |
| pre_common_block_permission |
| pre_common_block_pic |
| pre_common_block_style |
| pre_common_block_xml |
| pre_common_cache |
| pre_common_card |
| pre_common_card_log |
| pre_common_card_type |
| pre_common_connect_guest |
| pre_common_credit_log |
| pre_common_credit_log_field |
| pre_common_credit_rule |
| pre_common_credit_rule_log |
| pre_common_credit_rule_log_field |
| pre_common_cron |
| pre_common_devicetoken |
| pre_common_district |
| pre_common_diy_data |
| pre_common_domain |
| pre_common_failedip |
| pre_common_failedlogin |
| pre_common_friendlink |
| pre_common_grouppm |
| pre_common_invite |
| pre_common_magic |
| pre_common_magiclog |
| pre_common_mailcron |
| pre_common_mailqueue |
| pre_common_member |
| pre_common_member_action_log |
| pre_common_member_connect |
| pre_common_member_count |
| pre_common_member_crime |
| pre_common_member_field_forum |
| pre_common_member_field_home |
| pre_common_member_forum_buylog |
| pre_common_member_grouppm |
| pre_common_member_log |
| pre_common_member_magic |
| pre_common_member_medal |
| pre_common_member_newprompt |
| pre_common_member_profile |
| pre_common_member_profile_setting |
| pre_common_member_security |
| pre_common_member_secwhite |
| pre_common_member_stat_field |
| pre_common_member_status |
| pre_common_member_validate |
| pre_common_member_verify |
| pre_common_member_verify_info |
| pre_common_member_wechat |
| pre_common_member_wechatmp |
| pre_common_myapp |
| pre_common_myinvite |
| pre_common_mytask |
| pre_common_nav |
| pre_common_onlinetime |
| pre_common_optimizer |
| pre_common_patch |
| pre_common_plugin |
| pre_common_pluginvar |
| pre_common_process |
| pre_common_regip |
| pre_common_relatedlink |
| pre_common_remote_port |
| pre_common_report |
| pre_common_searchindex |
| pre_common_seccheck |
| pre_common_secquestion |
| pre_common_session |
| pre_common_setting |
| pre_common_smiley |
| pre_common_sphinxcounter |
| pre_common_stat |
| pre_common_statuser |
| pre_common_style |
| pre_common_stylevar |
| pre_common_syscache |
| pre_common_tag |
| pre_common_tagitem |
| pre_common_task |
| pre_common_taskvar |
| pre_common_template |
| pre_common_template_block |
| pre_common_template_permission |
| pre_common_uin_black |
| pre_common_usergroup |
| pre_common_usergroup_field |
| pre_common_visit |
| pre_common_word |
| pre_common_word_type |
| pre_connect_disktask |
| pre_connect_feedlog |
| pre_connect_memberbindlog |
| pre_connect_postfeedlog |
| pre_connect_tthreadlog |
| pre_forum_access |
| pre_forum_activity |
| pre_forum_activityapply |
| pre_forum_announcement |
| pre_forum_attachment |
| pre_forum_attachment_0 |
| pre_forum_attachment_1 |
| pre_forum_attachment_2 |
| pre_forum_attachment_3 |
| pre_forum_attachment_4 |
| pre_forum_attachment_5 |
| pre_forum_attachment_6 |
| pre_forum_attachment_7 |
| pre_forum_attachment_8 |
| pre_forum_attachment_9 |
| pre_forum_attachment_exif |
| pre_forum_attachment_unused |
| pre_forum_attachtype |
| pre_forum_bbcode |
| pre_forum_collection |
| pre_forum_collectioncomment |
| pre_forum_collectionfollow |
| pre_forum_collectioninvite |
| pre_forum_collectionrelated |
| pre_forum_collectionteamworker |
| pre_forum_collectionthread |
| pre_forum_creditslog |
| pre_forum_debate |
| pre_forum_debatepost |
| pre_forum_faq |
| pre_forum_filter_post |
| pre_forum_forum |
| pre_forum_forum_threadtable |
| pre_forum_forumfield |
| pre_forum_forumrecommend |
| pre_forum_groupcreditslog |
| pre_forum_groupfield |
| pre_forum_groupinvite |
| pre_forum_grouplevel |
| pre_forum_groupuser |
| pre_forum_hotreply_member |
| pre_forum_hotreply_number |
| pre_forum_imagetype |
| pre_forum_medal |
| pre_forum_medallog |
| pre_forum_memberrecommend |
| pre_forum_moderator |
| pre_forum_modwork |
| pre_forum_newthread |
| pre_forum_onlinelist |
| pre_forum_order |
| pre_forum_poll |
| pre_forum_polloption |
| pre_forum_polloption_image |
| pre_forum_pollvoter |
| pre_forum_post |
| pre_forum_post_location |
| pre_forum_post_moderate |
| pre_forum_post_tableid |
| pre_forum_postcache |
| pre_forum_postcomment |
| pre_forum_postlog |
| pre_forum_poststick |
| pre_forum_promotion |
| pre_forum_ratelog |
| pre_forum_relatedthread |
| pre_forum_replycredit |
| pre_forum_rsscache |
| pre_forum_sofa |
| pre_forum_spacecache |
| pre_forum_statlog |
| pre_forum_thread |
| pre_forum_thread_moderate |
| pre_forum_threadaddviews |
| pre_forum_threadcalendar |
| pre_forum_threadclass |
| pre_forum_threadclosed |
| pre_forum_threaddisablepos |
| pre_forum_threadhidelog |
| pre_forum_threadhot |
| pre_forum_threadimage |
| pre_forum_threadlog |
| pre_forum_threadmod |
| pre_forum_threadpartake |
| pre_forum_threadpreview |
| pre_forum_threadprofile |
| pre_forum_threadprofile_group |
| pre_forum_threadrush |
| pre_forum_threadtype |
| pre_forum_trade |
| pre_forum_tradecomment |
| pre_forum_tradelog |
| pre_forum_typeoption |
| pre_forum_typeoptionvar |
| pre_forum_typevar |
| pre_forum_warning |
| pre_home_album |
| pre_home_album_category |
| pre_home_appcreditlog |
| pre_home_blacklist |
| pre_home_blog |
| pre_home_blog_category |
| pre_home_blog_moderate |
| pre_home_blogfield |
| pre_home_class |
| pre_home_click |
| pre_home_clickuser |
| pre_home_comment |
| pre_home_comment_moderate |
| pre_home_docomment |
| pre_home_doing |
| pre_home_doing_moderate |
| pre_home_favorite |
| pre_home_feed |
| pre_home_feed_app |
| pre_home_follow |
| pre_home_follow_feed |
| pre_home_follow_feed_archiver |
| pre_home_friend |
| pre_home_friend_request |
| pre_home_friendlog |
| pre_home_notification |
| pre_home_pic |
| pre_home_pic_moderate |
| pre_home_picfield |
| pre_home_poke |
| pre_home_pokearchive |
| pre_home_share |
| pre_home_share_moderate |
| pre_home_show |
| pre_home_specialuser |
| pre_home_userapp |
| pre_home_userappfield |
| pre_home_visitor |
| pre_mobile_setting |
| pre_mobile_wechat_authcode |
| pre_mobile_wechat_masssend |
| pre_mobile_wechat_resource |
| pre_mobile_wsq_threadlist |
| pre_portal_article_content |
| pre_portal_article_count |
| pre_portal_article_moderate |
| pre_portal_article_related |
| pre_portal_article_title |
| pre_portal_article_trash |
| pre_portal_attachment |
| pre_portal_category |
| pre_portal_category_permission |
| pre_portal_comment |
| pre_portal_comment_moderate |
| pre_portal_rsscache |
| pre_portal_topic |
| pre_portal_topic_pic |
| pre_security_evilpost |
| pre_security_eviluser |
| pre_security_failedlog |
| pre_ucenter_admins |
| pre_ucenter_applications |
| pre_ucenter_badwords |
| pre_ucenter_domains |
| pre_ucenter_failedlogins |
| pre_ucenter_feeds |
| pre_ucenter_friends |
| pre_ucenter_mailqueue |
| pre_ucenter_memberfields |
| pre_ucenter_members |
| pre_ucenter_mergemembers |
| pre_ucenter_newpm |
| pre_ucenter_notelist |
| pre_ucenter_pm_indexes |
| pre_ucenter_pm_lists |
| pre_ucenter_pm_members |
| pre_ucenter_pm_messages_0 |
| pre_ucenter_pm_messages_1 |
| pre_ucenter_pm_messages_2 |
| pre_ucenter_pm_messages_3 |
| pre_ucenter_pm_messages_4 |
| pre_ucenter_pm_messages_5 |
| pre_ucenter_pm_messages_6 |
| pre_ucenter_pm_messages_7 |
| pre_ucenter_pm_messages_8 |
| pre_ucenter_pm_messages_9 |
| pre_ucenter_protectedmembers |
| pre_ucenter_settings |
| pre_ucenter_sqlcache |
| pre_ucenter_tags |
| pre_ucenter_vars |
+———————————–+
297 rows in set (0.04 sec)

mysql> exit;
其中以pre_ucenter开头的表是ucenter数据库用的,其他的pre_开头的表都是discuz程序自己用的。附discuz的配置文件。

3.1config_global.php
<?php
$_config = array();

// —————————- CONFIG DB —————————– //
$_config[‘db’][‘1’][‘dbhost’] = ‘localhost’;
$_config[‘db’][‘1’][‘dbuser’] = ‘root’;
$_config[‘db’][‘1’][‘dbpw’] = ‘gogogo’;
$_config[‘db’][‘1’][‘dbcharset’] = ‘utf8’;
$_config[‘db’][‘1’][‘pconnect’] = ‘0’;
$_config[‘db’][‘1’][‘dbname’] = ‘discuz’;
$_config[‘db’][‘1’][‘tablepre’] = ‘pre_’;
$_config[‘db’][‘slave’] = ”;
$_config[‘db’][‘common’][‘slave_except_table’] = ”;

// ————————– CONFIG MEMORY ————————— //
$_config[‘memory’][‘prefix’] = ‘q2QrEN_’;
$_config[‘memory’][‘redis’][‘server’] = ”;
$_config[‘memory’][‘redis’][‘port’] = 6379;
$_config[‘memory’][‘redis’][‘pconnect’] = 1;
$_config[‘memory’][‘redis’][‘timeout’] = ‘0’;
$_config[‘memory’][‘redis’][‘requirepass’] = ”;
$_config[‘memory’][‘redis’][‘serializer’] = 1;
$_config[‘memory’][‘memcache’][‘server’] = ”;
$_config[‘memory’][‘memcache’][‘port’] = 11211;
$_config[‘memory’][‘memcache’][‘pconnect’] = 1;
$_config[‘memory’][‘memcache’][‘timeout’] = 1;
$_config[‘memory’][‘apc’] = 1;
$_config[‘memory’][‘xcache’] = 1;
$_config[‘memory’][‘eaccelerator’] = 1;
$_config[‘memory’][‘wincache’] = 1;

// ————————– CONFIG SERVER ————————— //
$_config[‘server’][‘id’] = 1;

// ————————- CONFIG DOWNLOAD ————————– //
$_config[‘download’][‘readmod’] = 2;
$_config[‘download’][‘xsendfile’][‘type’] = ‘0’;
$_config[‘download’][‘xsendfile’][‘dir’] = ‘/down/’;

// ————————– CONFIG OUTPUT ————————— //
$_config[‘output’][‘charset’] = ‘utf-8’;
$_config[‘output’][‘forceheader’] = 1;
$_config[‘output’][‘gzip’] = ‘0’;
$_config[‘output’][‘tplrefresh’] = 1;
$_config[‘output’][‘language’] = ‘zh_cn’;
$_config[‘output’][‘staticurl’] = ‘static/’;
$_config[‘output’][‘ajaxvalidate’] = ‘0’;
$_config[‘output’][‘iecompatible’] = ‘0’;

// ————————– CONFIG COOKIE ————————— //
$_config[‘cookie’][‘cookiepre’] = ‘GHqP_’;
$_config[‘cookie’][‘cookiedomain’] = ”;
$_config[‘cookie’][‘cookiepath’] = ‘/’;

// ————————- CONFIG SECURITY ————————– //
$_config[‘security’][‘authkey’] = ‘0b6a75xqRIY7AF47’;
$_config[‘security’][‘urlxssdefend’] = 1;
$_config[‘security’][‘attackevasive’] = ‘0’;
$_config[‘security’][‘querysafe’][‘status’] = 1;
$_config[‘security’][‘querysafe’][‘dfunction’][‘0’] = ‘load_file’;
$_config[‘security’][‘querysafe’][‘dfunction’][‘1’] = ‘hex’;
$_config[‘security’][‘querysafe’][‘dfunction’][‘2’] = ‘substring’;
$_config[‘security’][‘querysafe’][‘dfunction’][‘3’] = ‘if’;
$_config[‘security’][‘querysafe’][‘dfunction’][‘4’] = ‘ord’;
$_config[‘security’][‘querysafe’][‘dfunction’][‘5’] = ‘char’;
$_config[‘security’][‘querysafe’][‘daction’][‘0’] = ‘@’;
$_config[‘security’][‘querysafe’][‘daction’][‘1’] = ‘intooutfile’;
$_config[‘security’][‘querysafe’][‘daction’][‘2’] = ‘intodumpfile’;
$_config[‘security’][‘querysafe’][‘daction’][‘3’] = ‘unionselect’;
$_config[‘security’][‘querysafe’][‘daction’][‘4’] = ‘(select’;
$_config[‘security’][‘querysafe’][‘daction’][‘5’] = ‘unionall’;
$_config[‘security’][‘querysafe’][‘daction’][‘6’] = ‘uniondistinct’;
$_config[‘security’][‘querysafe’][‘dnote’][‘0’] = ‘/*’;
$_config[‘security’][‘querysafe’][‘dnote’][‘1’] = ‘*/’;
$_config[‘security’][‘querysafe’][‘dnote’][‘2’] = ‘#’;
$_config[‘security’][‘querysafe’][‘dnote’][‘3’] = ‘–‘;
$_config[‘security’][‘querysafe’][‘dnote’][‘4’] = ‘”‘;
$_config[‘security’][‘querysafe’][‘dlikehex’] = 1;
$_config[‘security’][‘querysafe’][‘afullnote’] = ‘0’;

// ————————– CONFIG ADMINCP ————————– //
// ——– Founders: $_config[‘admincp’][‘founder’] = ‘1,2,3’; ——— //
$_config[‘admincp’][‘founder’] = ‘1’;
$_config[‘admincp’][‘forcesecques’] = ‘0’;
$_config[‘admincp’][‘checkip’] = 1;
$_config[‘admincp’][‘runquery’] = ‘0’;
$_config[‘admincp’][‘dbimport’] = 1;

// ————————– CONFIG REMOTE ————————— //
$_config[‘remote’][‘on’] = ‘0’;
$_config[‘remote’][‘dir’] = ‘remote’;
$_config[‘remote’][‘appkey’] = ’62cf0b3c3e6a4c9468e7216839721d8e’;
$_config[‘remote’][‘cron’] = ‘0’;

// ————————— CONFIG INPUT ————————— //
$_config[‘input’][‘compatible’] = 1;
// ——————- THE END ——————– //

?>

3.2config_ucenter.php
<?php
define(‘UC_CONNECT’, ‘mysql’);

define(‘UC_DBHOST’, ‘localhost’);
define(‘UC_DBUSER’, ‘root’);
define(‘UC_DBPW’, ‘gogogo’);
define(‘UC_DBNAME’, ‘discuz’);
define(‘UC_DBCHARSET’, ‘utf8’);
define(‘UC_DBTABLEPRE’, ‘`discuz`.pre_ucenter_’);
define(‘UC_DBCONNECT’, 0);

define(‘UC_CHARSET’, ‘utf-8’);
define(‘UC_KEY’, ‘yef1zdP3O7B4r0L14ap2o80941f83cTdJ5Bedf97x1ten5D0ZcN6t263ufXay77d’);
define(‘UC_API’, ‘http://localhost/discuz/uc_server’);
define(‘UC_APPID’, ‘1’);
define(‘UC_IP’, ”);
define(‘UC_PPP’, 20);
?>

Author: bkdwei