In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the solution of mysql import no more than 2m. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
Mysql import no more than 2m solution: first open php.ini and modify the "upload_max_filesize, memory_limit, post_max_size" parameters; then restart the system; finally, re-execute the import command.
Mysql Import data size setting method
The solution of MySQL Import Database File maximum limit 2048KB and phpmyadmin Import data maximum limit 2048KB
Solution:
1. Open php.ini. Find the three parameters upload_max_filesize, memory_limit, and post_max_size!
(by default, php only allows the maximum uploaded data to be 2m, that is, 2048KB, and the maximum memory usage memory_limit is only 128m, which is 2m for Magi Post)
2. Make the following changes according to the actual performance configuration of your server: (note: the following are the changes made according to my server performance and hardware configuration.)
Upload_max_filesize = 8m (the maximum upload limit is set to 8m, which should be enough for general file WEB uploads)
Memory_limit = 512m (since the memory of the server is 2GB, it's not too much to add 512m here, huh)
Post_max_size = 8m (the maximum Post data is also set to 8MB, which is the same as upload_max)
3. After the change, I restart the system, and then execute the import command again:
Import has been successfully finished, 399 queries executed.
(shows how many requests were successfully processed after the import was successful.)
(note: after the change, when you are on the import command line of phpMyadmin, although (sometimes it may still show as: maximum limit: 2048KB/Max: 2048KiB), you can actually import backup files exported by MySQL database .sql of no more than 8m! In addition, after changing the php.ini, don't forget to restart the web service or the server! It will be effective after reboot!)
For this record, I hope it will be helpful to the friends who encounter the same problem.
Local test php program, often need to import database files through Phpmyadmin, encountered phpmyadmin import data maximum limit 2048KB error.
Error prompt: You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit .
When you used phpmyadmin to import a mysql database, the default mysql database could only import a maximum of 2m.
Here are the solutions:
In most cases, the upload_max_filesize in the php.ini under the PHP5 folder is modified, but after modifying this, the problem is still prompted.
Then the following changes are made:
Modify PHP.ini
The switch on whether file_uploads on allows files to be uploaded through HTTP. Default is ON, that is, on.
Upload_tmp_dir-Files are uploaded to the server where temporary files are stored. If not specified, the system default temporary folder will be used.
Upload_max_filesize 20m lookout business, that is, the maximum file size allowed to be uploaded. The default is 2m
Post_max_size 30m refers to the maximum value that can be received to PHP through the form POST, including all the values in the form. The default is 8m
Description
Generally speaking, after setting the above four parameters, when the network is normal, uploading 8m large files, only setting the above four items will certainly work. Unless your network really has the upload speed of 100M/S, you have to continue to set the following parameters, which is the time to set it.
Max_execution_time 300 maximum time to run per PHP page (in seconds), default is 30 seconds
Max_input_time 300The maximum time required for each PHP page to receive data. Default is 60 seconds.
The maximum memory consumed by each PHP page of memory_limit 80m is 8m by default. If your computer's memory is large enough, you can set it a little larger.
Sets the maximum size allowed for POST data. This setting also affects file uploads. To upload a large file, the value must be greater than upload_max_filesize.
If memory limits are activated in the configuration script, memory_limit also affects file uploads. Generally speaking, memory_limit should be larger than post_max_size.
An effective way to restart iis is attached:
Save the following as iisadmin.bat and run it to restart
@ ECHO # IIS restart #
@ pause
Net stop w3svc
Net stop iisadmin
Net start w3svc
Net start iisadmin
MySQL import and export data implementation method most people use phpmyadmin inside the database import and export function, 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!
Thank you for reading! On the introduction of mysql no more than 2m solutions to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
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.