Arclid.com Ltd
Radway Green,
Crewe, Cheshire, UK
CW2 5PR

Tel: 0844 800 9672
E-Mail:
SSH Importing SQL dump Print E-mail

By Ben Norbury, on 26-10-2007 08:59

Views : 1744    

Favoured : 79

Published in : Articles, Website Development

A quick way to populate your MySQL database from a raw sql file with SSH access.

This is just useful to have somewhere so I thought I would post it. If you have many tables or records to set up it is the best way. I found this especially useful when I had a table which was over 30mb in size. 

  1. Save your sql into a file (example.sql)
  2. Upload to your server (/usr/local/home/httpd/vhtdocs/example.sql)
  3. Log into your SSH environment
  4. Simply type "mysql -h localhost -u user -p  db_name < /usr/local/home/httpd/vhtdocs/example.sql"
  5. You will be prompted for the mysql password
  6. The sql file will now be run

As simple as that.

Last update : 26-10-2007 08:59

   
Quote this article in website
Favoured
Print
Send to friend
Related articles
Save this to del.icio.us

Users' Comments  RSS feed comment
 

Average user rating

   (0 vote)

 


Add your comment
Name
E-mail
Title  
 
Comment
 
Available characters: 600
   Notify me of follow-up comments
  Mathguard security question:
X7U         F52      
  S    5    T A   QHY
  9   BU3   RG4      
  4    G      Y   5AQ
  Y         44S      
   
   

No comment posted



mXcomment 1.0.5 © 2007-2012 - visualclinic.fr
License Creative Commons - Some rights reserved
 
< Prev