Here you can search and view our site Knowledge Base. To find a specific article, use KB-article number format (ex. KB-1)
4UHosting Article number: kb-52
Importing a database from the command line
Here is a quick explanation of how to import a MySQL database that has been dumped into a text file.
1. Create a new database and mysql user in Cpanel. Refer to our Cpanel documentation for more info. Make sure the user has full permissions on the database.
2. Upload your sql file via FTP to the root of your account.
3. Login via SSH and enter the following command...
mysql -u USER -p DBNAME < dump.sql
Where USER is the database user you created, DBNAME is the name of the database you created and dump.sql is the name of the file you uploaded.
This article is the sole property of 4UHosting (4UH Ltd) and may only be viewed at our website http://www.4uhosting.co.uk Copying or reproducing this content in any form without permission is strictly prohibited.