2.11.4. Import database via console
Databases up to 300 MB or larger can be imported through the console.
- Connect to hosting via SSH.
- Run the command:
mysql -h host -u login --password='password' title < way/to/file/dump.sql
In a team:
- Instead
host
,login
password
andtitle
use appropriate data to connect to the databasewhere the import is made. The password must be enclosed in quotation marks. Note You can omit the key--password
and enter the password directly during connection. - Instead
path/to/file/dump.sql
specify the path to the dump file (or just its name if it is in the current directory).
- Enter database user passwordif you did not specify it in the connection command. Attention! For security reasons, in Linux systems, when entering a password or pasting it from the clipboard, characters are not displayed on the screen.
- Wait for the command to complete.