In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how to import and export a large amount of data from MySQL". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
You must have used the database import and export function in phpmyadmin, which is very convenient. However, in practical application, I found the following problems:
1 database more than a certain size, such as 6m when the use of export is generally no problem, can be correctly saved to the local hard disk, but import is not! The reason is: in general, PHP.INI sets the size limit of temporary files / uploaded files to 2m, while phpmyadmin uses the method of uploading, resulting in failure.
When the .SQL file exported to the hard disk is imported back, it often fails due to some problems in single quotation marks, so it can only be imported by mysql and other application programs. My database has exceeded 10m, so this problem must be solved. My train of thought:
Export: save the database / table structure with phpmyadmin, read the database contents with scripts and save them to a file!
Import: restore the database / table structure with phpmyadmin, read the file with a script, and save it to the library!
The export program is as follows: the calling method is * .phptable=tablename
This simple program currently saves one table at a time! Data of one field per behavior! The following is the referenced content:
< if ($table== ") exit (); mysql_connect (" localhost "," name "," password "); mysql_select_db (" database "); $result=mysql_query (" select*from$table "); if (mysql_num_rows ($result)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.