The following error is reported during installation:
If the current database already contains a data table with the same table prefix, you can modify "table name prefix" to avoid deleting old data or force installation. Force installation deletes old data and cannot be restored.
If the table prefix is the same, it will directly overwrite the installed version. discuz will not work.
Solution:
First install discuz as usual, but when you fill in the table prefix on the installation interface, it is assumed that it should be pre0 _, but if it is also pre _, an error will be reported. Therefore, we need to enter a prefix pre9 _. Click continue installation.
After the installation, we use the command or phpmyadmin to import our backup data to the database used by discuz. Because the prefixes of the two tables are different, no error is reported during import.
After importing the backup database, continue. The config_global.php and config_ucenter.php configuration files are available in the config/directory of the Forum. config_ucenter.php is the uncenter configuration file, and discuz and ucenter are installed at the same time.
In the above two files, find pre9 _ and change it to pre0 _. Then, when I access our forum, can I access it normally and the data is also restored (imported?
The last step is to delete a table prefixed with pr9 _ that is useless.
Add another method to batch delete specified prefix tables
Use the following statement:
Mysql> Select CONCAT ('drop table', table_name ,';')
-> FROM information_schema.tables
-> Where table_name LIKE 'wp0 _ % ';
Wp0 _ is the prefix of the table to be deleted. You can modify it as needed.
Display All tables whose names start with wp0 _ to be deleted. You only need to input one by one in the following order to delete it.
+ ------------------------------------------- +
| CONCAT ('drop table', table_name, ';') |
+ ------------------------------------------- +
| Drop table wp0_bannerize; |
| Drop table wp0_commentmeta; |
| Drop table wp0_comments; |
| Drop table wp0_gd_manager; |
| Drop table wp0_links; |
| Drop table wp0_moresecurelogin; |
| Drop table wp0_options; |
| Drop table wp0_pluginsTalkPLinker; |
| Drop table wp0_pluginsTalkPLinkerOptions; |
| Drop table wp0_post_relationships; |
| Drop table wp0_postmeta; |
| Drop table wp0_posts; |
| Drop table wp0_postviews_plus; |
| Drop table wp0_sam_ads; |
| Drop table wp0_sam_blocks; |
| Drop table wp0_sam_errors; |
| Drop table wp0_sam_places; |
| Drop table wp0_sam_zones; |
| Drop table wp0_term_relationships; |
| Drop table wp0_term_taxonomy; |
| Drop table wp0_terms; |
| Drop table wp0_usermeta; |
| Drop table wp0_users; |
| Drop table wp0_wfBadLeechers; |
| Drop table wp0_wfBlocks; |
| Drop table wp0_wfBlocksAdv; |
| Drop table wp0_wfConfig; |
| Drop table wp0_wfCrawlers; |
| Drop table wp0_wffilemod; |
| Drop table wp0_wfHits; |
| Drop table wp0_wfHoover; |
| Drop table wp0_wfIssues; |
| Drop table wp0_wfLeechers; |
| Drop table wp0_wfLockedOut; |
| Drop table wp0_wfLocs; |
| Drop table wp0_wfLogins; |
| Drop table wp0_wfNet404s; |
| Drop table wp0_wfReverseCache; |
| Drop table wp0_wfScanners; |
| Drop table wp0_wfStatus; |
| Drop table wp0_wfThrottleLog; |
| Drop table wp0_wfVulnScanners; |
| Drop table wp0_wp_bot_counter; |
| Drop table wp0_wp_rp_tags; |
| Drop table wp0_yarpp_related_cache; |
+ ------------------------------------------- +
45 rows in set (0.02 sec)