Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that the mysql import database file is too large

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to solve the problem that the database file imported by mysql is too large. 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.

The solution to the large file imported into the database by mysql is as follows: first, open [php.ini] and find the relevant parameters; then modify the file according to the actual performance configuration of the server; then restart the system after modification; and finally execute the import command.

The solution to the file that mysql imports into the database is too large:

Step 1: open php.ini and find the three parameters upload_max_filesize, memory_limit, and post_max_size!

The meanings they represent are:

Upload_max_filesize limits the maximum size of uploaded files.

Post_max_size sets the maximum size allowed for POST data.

Memory_limit sets the maximum number of bytes of memory that a script can apply for.

(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)

Step 2: make the following modifications according to the actual performance configuration of the server:

Upload_max_filesize = 8m (the maximum upload limit is set to 8m, which is enough for ordinary files to be uploaded by WEB)

Memory_limit = 512m (if the memory of the server is 2GB, it can be set to 512m)

Post_max_size = 8m (the maximum value of Post data is also set to 8MB, which is the same as upload_max)

Step 3: after the modification, restart the system, and then execute the import command, you will be prompted:

Import has been successfully finished,499 queries executed.

(shows that the import was successful, and 499 requests were processed successfully.)

But for students who use virtual hosts that do not support custom php.ini, they have to think of another way.

There is also a way: split the data file and then import it step by step!

Thank you for reading! On how to solve the mysql import database file is too big 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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report