I have two databases: one of which I'm using on a dev server and the other is the live version that I have exported from the dev database and imported to the live one.
I needed to go back and clear out the old dev database, and was going to import something else afterwards. I went and checked all the tables and did a DROP
query, but for some reason, this dropped all the tables from both my dev database and the live database. Luckily, I had backups of everything, but could anyone tell me why this is happening?
Here is my query, which is created when I do a 'Check All' tables and select 'DROP'. Using Wordpress here.
DROP TABLE `wp_commentmeta`, `wp_comments`, `wp_layerslider`, `wp_links`, `wp_options`, `wp_postmeta`, `wp_posts`, `wp_revslider_sliders`, `wp_revslider_slides`, `wp_slp_rep_query`, `wp_slp_rep_query_results`, `wp_store_locator`, `wp_terms`, `wp_term_relationships`, `wp_term_taxonomy`, `wp_usermeta`, `wp_users`;
You say in the comments that your dev is replicated to live.
DROP TABLE
statements get replicated just like any other statement. It's generally a really, really bad idea to have automated database replication from dev to live.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.