Have a Question?


Importing a big size database dump

You are here:
< All topics
Table of contents

Only phpMyAdmin can import a database with a size smaller than 50MB. In case you have DotRoll Plus, DotRoll Ultra or DotRoll Pro hosting, you have the option of importing a larger database.

  • Upload SQL Dump

    Use an FTP client to copy the SQL dump you want to import to your storage. The file may be copied directly to the start directory of your storage (/home/username).

  • MySQL database, user, password, and privileges

    On the cPanel interface, in the MySQL databases menu, create a MySQL user and set a password. Also assign the generated user to the database you want to import.

  • Generate SSH key, or set it up

  • Connect via SSH

  • PuTTY login

    PuTTY login

    In the Host Name (or IP address) field, enter the name of your main domain.
    Port is the default port 22.
    Next, click the “+” sign next to SSH.

    PuTTY login

    PuTTY login

    • In the Private key file for authentication box, enter the key for the cPanel interface or the private key that you created earlier.
      You can then save the configuration, but you can also connect to your storage immediately.
    • Using the Database Import with screen

      If you do not want to end the database import, enter the following command after the login:

      screen -S mysqlimport

      To import a database, you must issue the following command:

      mysql -udatabase_username -pdatabase_user_password -h localhost database_name <sql_dump_file.sql

      You can also use the Enter key to confirm your import.

      The switches mean:

      • -u MySQL database user name. Use the switch to enter the user name and do not need to be a space.
      • -p MySQL database user password.
      • -h MySQL server address

      The process may take longer depending on the server’s capacity and the size of the database. If you do not want to wait for the process, press the CTRL key and the a letter followed by the d key.

      "Ctrl-a" "d"

      With this command, the previously launched screen will be disconnected, however the operations released there will continue in the background. You can then close the current session by pressing the logout command or the “CTRL + D” keys.

    • Capture screen session

      You can check the import process by re-logging on to the server using an SSH client and then issue the following command:

      screen -r

      If you run multiple screens in your background, you can use the following command to display the list of currently running screens.

      screen -ls

      The system will pop up a list of previously disconnected screens. You can rejoin the disconnected session with the following command:

      screen -r 864870.mysqlimport
    • Close the screen session, delete the uploaded SQL file

      If you run only one screen, you can exit the exit command or use the following command:

      "Ctrl-a" "d" "d"

      Unfortunately, the command-line database import does not show a separate process flag of the import process. As soon as the imoprting is completed, the default command line will be returned. If there is an error in the file you want to import, the server stops the import process and writes the error. In such a case, the import will only occur to the fault.

      You may want to remove the SQL dump file you have stored for storage from the storage after the import is completed. Use this command to:

      rm sql_dump_file.sql
Was this article helpful?
0 out Of 5 Stars
5 Értékelés 0%
4 Értékelés 0%
3 Értékelés 0%
2 Értékelés 0%
1 Értékelés 0%
How can we correct this article?
Please submit the reason for your vote so that we can improve the article.