Importing large MySQL Databases via SSH

Chat about web technologies (IIS, Apache, etc...), hosting and server management.
Post Reply
Site Admin
Posts: 44

Importing large MySQL Databases via SSH

Post by admin » Wed Jul 21, 2021 6:43 pm

I encountered the issue while using VPS and CyberPanel, the max file size is limited to 8MB and one of my database was 35MB, I followed below steps and my database got uploaded to phpMyAdmin. First of all you need to create a database and user in CyberPanel and then you can follow below steps -

2. Log in to SSH as the root user. If you do not know how to do this, see
3. To log in to MySQL, type mysql -u username -p, where username is your database username.
4. When you see Enter password:, enter your password for that MySQL user.
5. If you did not include the use database command in the .SQL file, select the target database of the import. Do this by typing use database_name; and then press Enter.
6. Type SOURCE /path/to/sql/file.sql, and then press Enter.
Example :

Code: Select all

SOURCE /home/
7. Monitor the running import log to check for errors.
8. Once imported, visit phpMyAdmin and there you can see database is imported successfully.

Post Reply