---
title: "Import a Large MariaDB Database into Cloud Sites"
source: "https://docs.nexcess.com/hosting/cloud-sites/database-management/mariadb-mysql/import-a-large-mariadb-database-into-cloud-sites/"
description: "Upload databases that are 50MB or less into Cloud Sites using phpMyAdmin or myLittleAdmin database managers."
vertical: "Hosting"
date: "2024-03-04"
last_modified: "2026-06-30"
---

# Import a Large MariaDB Database into Cloud Sites

Upload databases that are 50MB or less into Cloud Sites using phpMyAdmin or myLittleAdmin database managers. However, if you need to import a database that exceeds 50MB, you will need to use a script and schedule a cron job to upload the database. See our article [Creating Cron Jobs in Cloud Sites](https://www.liquidweb.com/help-docs/creating-cron-jobs-in-cloud-sites/) for information on creating a cron job.

Below is a sample script that you can set up to upload a large database into Cloud Sites.

The code below is only an example, your specific site may require a different configuration. We recommend speaking with your developer before implementing any scripts. If you do copy/paste this code, it must be saved as a .config file only. As outlined in the [Liquid Web Terms of Service](https://www.liquidweb.com/policies/terms-of-service/), we are unable to help troubleshoot code issues and the example provided below is only for your own troubleshooting purposes.

```
#!/bin/sh
mysql -h DB_HOST -u DB_USER -p'DB_PASSWORD' DB_NAME < /path/to/file/db_import.sql
```

Replace the placeholders with your actual information, definitions of the information needed are below:

- DB\_HOST: The name of the database host.
- DB\_USER: The name of the database user.
- DB\_PASSWORD: The password of the target database.
- DB\_NAME: The name of the database you are creating/restoring.

When creating the script, it needs to be saved and created as a perl/bash cron job. Once you build the script, you can upload it into your Cloud Sites cron job.

| ### **Warning:** |
|---|
| Do not store script files in your webroot directory, this can create a security issue. Use a non-public viewable directory to store any scripts. |
