How to export data from a single table and import into single table using phpMyAdmin? | Bangla Tech Jagat

There may be times when you need to export data from a single table and import it into a single table using an existing database phpMy...




There may be times when you need to export data from a single table and import it into a single table using an existing database phpMyAdmin.  In this post, we will discuss how to export data from a single table and import into a single table using phpMyAdmin?

Here is a scenario when such an activity may be needed for better understanding. This is from my practical experience.

So, there is this WordPress website we had, and the theme has to be customized. Since we did not want to disrupt the live site, we took a backup and installed a copy on the development system to further customize the site. During the customization process, we ran into some issues. And to isolate the problem, we disabled some plugins to check if the plugins were interfering with the problem.

The problem was, we were using a WordPress plugin called "Post Views Counter" to display views on each post. During the troubleshooting process described above, we also disabled the "Post Views Counter" plugin (or maybe even deleted it from the plugins page in WordPress). Later when we re-installed / re-enabled the plugin, we found the stats have been reset. The post views were all zeros. And we wanted to retain the values.

After the required customization was done, we needed to bring the stats from the "Post Views Counter" to the live site to the development site, before we upload it to the live server. Note: There could have been another way to do this, but we didn't want to take a risk. More on this described at the end of this post.

So here is what we did: export data from a single table and import into a single table using phpMyAdmin.

How to export data from a single table using phpMyAdmin?

To backup only one particular table in phpMyAdmin, click on the particular table and click Export. It will only export the table and not the entire database.

Activities on the live server:
Logged in to phpMyAdmin
Backed up the entire database (just in case needed)
Clicked on the particular table from the left sidebar (ngk_post_views in this case)
Clicked Export
This exported only the table (ngk_post_views in this case) in .sql file


Now that we have the backup of the particular table (ngk_post_views in this case), we need to restore it to the development server.


How to import data from a single table using phpMyAdmin?

To import data from a single table using phpMyAdmin, the process is the same as importing database. BUT, the table you are importing should not exist. Otherwise, phpMyAdmin will throw an error.




Activities on the development server:
Logged in to phpMyAdmin
Backed up the entire database (very important)
Click on the Database
Then select the table we will import, and click drop (table).





The Select T Database Again, Just In Case It Is Not Selected
Click and Import and Select T Backup File of TABLEDownloaded from Live Server



If Every Thing Gets Better, T Import Solda Success (Unless There Are Other Issues, Whitch Bay DD Note Encounter)





We clicked on the table and checked the values and the counts were restored.
View the posts on the site's front end, and we can see the counters restored.
Now that the post view counts have been restored, we have migrated the site to the live server.



By the way, to upload your WordPress website to live server, you can use plugins like "Duplicator". Here is a previous post on -How to use "How to download a website from live server to development local server |   Bangla Tech Jagat



As mentioned above, this could have been achieved in another way.
We could have "dropped" the post views table from the development system of phpMyAdmin and then exported the database. When this is uploaded to the live server, the post views table on the live server database is expected to be as it is. Ensure backups are taken before attempting any of the examples in this post, and at your own risk.


COMMENTS

Subscribe for New Post Notifications

Name

10000mAh battery power bank came to India in great colors,1,2018,1,2019,2,5G,1,Adsense,1,Andriod,16,Andriod phone,5,Android,2,Apple,1,Apple iPhone 11,1,Apple iPhone XR,1,Apple mobile,1,Apps,2,auto ads,1,bangla tech jagat,37,Bing,1,Blog Design,1,Blogger,1,Blogger Templates,1,Blogger Tools,1,Blogger Tutorials,4,Blogger Widget,2,Blogspot SEO,1,Camera Discover,1,Camtasia,1,ChatGPT,1,Computer shortcut keys,1,Computer virus,1,dark mode,1,Domain Search,1,Drone,1,Drone fly,1,Drone Reviews,1,Earnings,1,Epson,1,Epson Printer,1,Facebook,2,featured,12,fingerprint,1,Fix porblem,1,Fortnite,1,free software,1,Games,12,gaming smartphone,2,Google,4,Google Adsense,1,Google Pixel,1,Google STADIA,1,HDMI Global,1,History,3,How to,12,How to discover television?,1,How to fix,3,How to Setup Fingerprint Lock on WhatsApp,1,Html incoader,1,html parser,1,HUAWI P40 LITE,1,Internet,1,iOS,1,iPhone,1,iPhone password forget,1,iphone SE,1,iphone smart phone,1,iPhone XR,1,iPhone11,1,IQOO 3 5G,1,Java Script parser,1,JavaScript incoader,1,Jio,1,Jio News,1,Jio Phone 2,1,microsoft windows,1,MIUI 11,1,Monitors,1,Motorola MOTO G5 PLUS,1,News,13,Newz,3,Nokia,1,one plus 6T review,1,one plus 8,1,one plus 8 pro,1,Oneplus 6T,1,Onnline Earnings,1,opensource,1,oppo Reno z,1,philips-launched-new-3-monitor-in-india-start-at-rs-9999,1,Photoshop,1,play store,2,Pop-up Subscriber,1,Powerful Power Bank,1,pubg,4,PubG mobile,8,PUBG MOBILE 0.17.0,1,PUBG mobile new update,2,PUBG mobile update,4,Quad camera,1,Recycle Bin,1,Redmi,1,Redmi note 8 pro,1,Redmi note 8T,1,Reno 2 F,1,review,1,Reviews,7,Royal Pass,1,Season 12 update,1,SEO,1,SEO Tips,1,site map,1,slider,26,smartphone,2,Social media,1,Softwre,2,Tech Blog,2,Tech News,9,Technology update,9,Tips and Tricks,23,useful,1,version 0.15.0 update for PUBG Mobile,1,Vivo S5,1,VR,1,Web Design,5,webmaster tools submitted,1,What is a domain name?,1,WhatsApp,5,windows,4,wordpress Templates,1,Wordpress theme,1,Wordpress Tutorials,1,Xbox,1,yahoo,1,YouTube,5,
ltr
item
Bangla Tech Jagat: How to export data from a single table and import into single table using phpMyAdmin? | Bangla Tech Jagat
How to export data from a single table and import into single table using phpMyAdmin? | Bangla Tech Jagat
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWynPn7o3G0QjEFWKsgzHxTK-88NHbzJqqO7WmA-iZ53L5xDAJj_-21hTALSbrGBP01vFSRJrBsYY8w4bXTUIHh0CQaO1IJ5hQl0EH3e75LAL_MkZ_RVO6-uV08wocoRG2Sf7jN5xgVj5v/s320/phpmyadmin-export-import-single-table.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWynPn7o3G0QjEFWKsgzHxTK-88NHbzJqqO7WmA-iZ53L5xDAJj_-21hTALSbrGBP01vFSRJrBsYY8w4bXTUIHh0CQaO1IJ5hQl0EH3e75LAL_MkZ_RVO6-uV08wocoRG2Sf7jN5xgVj5v/s72-c/phpmyadmin-export-import-single-table.jpg
Bangla Tech Jagat
https://banglatechjagat.blogspot.com/2019/11/how-to-export-data-from-single-table.html
https://banglatechjagat.blogspot.com/
https://banglatechjagat.blogspot.com/
https://banglatechjagat.blogspot.com/2019/11/how-to-export-data-from-single-table.html
true
4660954514523969173
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy