---
title: "MySQL Database Import Is Failing Because The .sql File Is Too Big"
id: "2132"
type: "ht_kb"
slug: "i-am-having-troubles-importing-my-sql-database-its-too-big"
published_at: "2012-07-31T01:56:10+00:00"
modified_at: "2019-09-30T17:10:59+00:00"
url: "https://www.greengeeks.com/support/article/i-am-having-troubles-importing-my-sql-database-its-too-big/"
markdown_url: "https://www.greengeeks.com/support/article/i-am-having-troubles-importing-my-sql-database-its-too-big.md"
excerpt: "Browser-based file uploads can fail if the file size you are attempting to upload is larger than the HTTP post size configuration on the web server. If a browser-based upload fails, you can restore your MySQL database by logging into..."
taxonomy_ht_kb_category:
  - "Server Questions"
---

Browser-based file uploads can fail if the file size you are attempting to upload is larger than the HTTP post size configuration on the web server.

If a browser-based upload fails, you can restore your MySQL database by logging into your account using an SSH client (or if you prefer, web-based terminal access is available in cPanel).

Once you have [created the database and the database user in cPanel](https://www.greengeeks.com/support/article/how-to-create-a-new-mysql-database-and-mysql-database-user/)
, here’s how to import the .sql database file:

1. Upload the .sql file to your /public_html directory using an FTP client or [the cPanel File Manager](https://www.greengeeks.com/support/article/how-to-upload-a-file-using-the-cpanel-file-manager/)
.

2. Start a terminal client (PuTTy, etc.) and [connect to your account](https://www.greengeeks.com/support/?post_type=ht_kb&p=13689)
.

3. Run the following command in the console:

```
mysql -u mysql_user -p mysql_db < public_html/database.sql
```

*Replace **mysql_user** with your database username, **mysql_db** with your database name, and **database.sql** with the name of your uploaded .sql file.*

4. Enter the MySQL user password and hit your enter key.

That’s it. If you did not get an error in your terminal client, the database import was successful.

If you are still having trouble importing your database after following these steps, [please open a ticket in GreenGeeks](https://my.greengeeks.com/login)
 and include the .sql file name and the name of the database you are trying to import to. A member of our support staff will assist with the import.
