2.11.4. Import database using console

This method is suitable for importing dumps of any size.

To import the database, do the following:

  1. Using the file manager or any FTP client, upload the database dump file in SQL format to the hosting.
  2. Connect to the hosting via SSH.
  3. Import dump:
    mysql -h DB_HOST -u DB_LOGIN -p DB_NAME < PATH/TO/DUMP.SQL

    In the command, use your own data:

    • DB_HOST, DB_LOGIN, DB_NAMEdata for connecting to the database, where the import is performed.
    • PATH/TO/DUMP.SQL — path to the SQL file (or its name if the file is in the current directory).
  4. Enter database user password (for security reasons, characters are not displayed on the screen when entering the password).
  5. Wait for the command to complete.
Content

    (1)

    Comments

    sergeysm128
    я б використовував такий варіант

    mysql -h хост -u логін назва < шлях/до/файлу/дамп.sql

    а потім ввести пароль