Avatar ·

How to increase file upload limit in phpMyAdmin when importing large SQL dumps?

Hello everyone! I'm a beginner in PHP and MySQL. I'm developing a website on a local server (OpenServer). Today I decided to transfer a database from one hosting to another. I downloaded a dump via phpMyAdmin — the file turned out to be about 50 MB. But when I try to import it via phpMyAdmin on the new hosting (or locally), an error appears: "Probably the size of the uploaded file exceeds the maximum allowed size". In the import interface it says "Maximum size: 2,048 KB" — that's only 2 MB! How can I upload a 50 MB dump? I tried splitting the file into parts manually using a text editor, but it's very tedious and I'm afraid of breaking the table structure. Maybe there is a way to increase this limit? I'm using PHP 8.0, MySQL 5.7, the latest version of phpMyAdmin. Here is an example of my dump (just the beginning, what