Hello Guest, if you read this, it means you are not registered. Click here to register a few simple steps, you will enjoy all the features of our Forum. Please note that nicknames are prohibited lewd or meaningless (no numbers or letters at random) and introduce yourself in the section for you to meet our community.
Import a large MySQL file using SSH - Blogs - GOZEN Host Forums
View RSS Feed

GOZEN Host blogs

Import a large MySQL file using SSH

Rate this Entry
by , 04-28-2012 at 07:13 PM (2163 Views)
You can easily restore or import MySQL data with MySQL command itself. First you need to login to your system using ssh or putty (from Windows based system).
For example: Login to SSH (make sure you have access to SSH, contact your hosting provider)
blogs/gozen-3/attachments/2-import-large-mysql-file-using-ssh-mysql.jpg
Now type following command to import sql data file:
Code:
$ mysql -u username -p -h localhost data-base-name < data.sql
If you have dedicated database server, replace localhost name with actual server name or IP address:
Code:
$ mysql -u username -p -h 192.168.1.10 databasename < data.sql
If you do not know the database name or database name is included in sql dump you can try out something as follows:
Code:
$ mysql -u username -p -h 192.168.1.10 < data.sql

Submit "Import a large MySQL file using SSH" to Digg Submit "Import a large MySQL file using SSH" to del.icio.us Submit "Import a large MySQL file using SSH" to StumbleUpon Submit "Import a large MySQL file using SSH" to Twitter

Tags: sql, ssh Add / Edit Tags
Categories
Web Development