How to import a large SQL file (DirectAdmin + SSH method) Print

  • 0

Overview

Small SQL files can be imported through phpMyAdmin, but larger files require using SSH for a stable and faster import. This guide explains both methods.

Method 1 — Import using phpMyAdmin (small databases)

  1. Go to DirectAdmin → MySQL Management
  2. Click phpMyAdmin
  3. Select your database
  4. Go to Import
  5. Upload your .sql file
  6. Click Go

Use this only for databases under 100MB.

Method 2 — SSH Import (recommended for large SQL files)

You need SSH access to your hosting (available on VexoWeb Business plans).

1. Upload your SQL file

Upload the file to:

/home/username/

2. SSH into your hosting

ssh username@yourdomain.com

3. Run the import command

mysql -u username_dbuser -p username_dbname < backup.sql

Tips

  • gzip your SQL to reduce size:
    gzip backup.sql
  • For imports over 1GB, always use SSH.
  • Ensure your database user has import privileges.

Was this answer helpful?

« Back