Knowledge Base
MilesWeb / MySQL

MySQL Database Import Is Failing, Reason: The .sql File Is Too Big

Approx. read time : 2 min

Uploading browser-based file can fail in case the file size that you are trying to upload is larger as compared to the HTTP post size configuration on the web server.

In case this happens, your MySQL database can be restored just by logging onto your account via SSH client (or if you want you can get the web-based terminal access in cPanel).

After creating the database and the database user in cPanel, check below the steps to import the .sql database file:

1. Using an FTP client or the cPanel File Manager, upload the .sql file to your /public_html directory.

2. Then start a terminal client (PuTTy, etc.) and connect to your account.

3. Execute the below command in the console:

Ensure that you replace mysql_user with your database username, mysql_db with your database name, and database.sql with the name of.sql file that you have uploaded.

4. Enter the MySQL user password and click on your enter key.

Now, if you don’t get an error in your terminal client, it indicates that the database import was successful.

If there is still trouble importing your database after following these steps, please open a ticket in MilesWeb and include the .sql file name and the name of the database you want to import to. Our support team will assist you with the import.

Also Read:

How to Optimize a MySQL Database Using SSH?

How To Create MySQL Tables In phpMyAdmin?

Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.
Need help? We’re always here for you.