Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-06-2015, 03:35 PM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to remove Table in Repair / Optimize Tables

Hello,

As title mentioned, I want to remove some tables in Repair / Optimize Tables in Admincp

tables came from removed plugins but they are showing in Repair / Optimize Tables

Can I remove them from admin page or from database manually?

Thanks
Reply With Quote
  #2  
Old 08-06-2015, 03:49 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think your best bet is to (make a backup first) and then manually remove the tables that are associated with products you no longer have installed from your database.

Obviously, a well-coded product will include "Uninstall Code" that removes any database structure changes that were made when installed.
Reply With Quote
Благодарность от:
webmastersun
  #3  
Old 08-06-2015, 03:55 PM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
I think your best bet is to (make a backup first) and then manually remove the tables that are associated with products you no longer have installed from your database.
Where to find these tables?

Quote:
Originally Posted by MarkFL View Post
Obviously, a well-coded product will include "Uninstall Code" that removes any database structure changes that were made when installed.
Of course I uninstalled plugins (products) from admincp but I don't know why some tables still existed in Repair / Optimize Tables
Reply With Quote
  #4  
Old 08-06-2015, 04:13 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you don't know how to access your database on your server, it may be simpler to use manual SQL queries to drop the unneeded table(s).

For each table you want to remove, run the following manual SQL query:

DROP TABLE 'table_name'

where table_name is the name of the table you wish to remove.

Note: Of course, make a backup of your database first before performing these queries in case something goes wrong.

What I meant by my second comment was directed towards the authors of the products themselves (not you)...there should be uninstall code that removes created tables and added columns, etc. when a product is uninstalled. This way when a user uninstalls a product there are no database changes left behind that are no longer needed.
Reply With Quote
  #5  
Old 08-06-2015, 06:06 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OR simply rename the table - https://dev.mysql.com/doc/refman/5.0...ame-table.html

This way its never deleted until you're 100% sure its not required, this also alleviates the need to re-import any single tables or for those not as experienced forgo the complete database restoration.

I always try to remember now-a-days to let others know to change first before deleting, same with old folders and files when cleaning up your server/ftp etc you CHMOD them to 000 instead of deleting, refresh the forum then navigate and check if no issues then delete the folders/files - if an error redo CHMOD and everything is back to normal. By simply changing first instead of deleting, it can save those not up to par on the process a mighty big migraine! So as we can see, for those who don't run backups on a normal basis or who might be frequenting this thread about to delete something before backing it up (database and/or files as well) that you could change it first to ensure its not needed, then delete if not required .
Reply With Quote
4 благодарности(ей) от:
cellarius, MarkFL, ozzy47, puertoblack2003
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:53 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05084 seconds
  • Memory Usage 2,211KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_box_bit
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete