How to Resotre MySQL Dump Uploaded to a server

Discussion in 'MySQL' started by Hemanth, Apr 1, 2006.

  1. #1
    Hi,

    I've my Databse dump uploaded in to my public_html directory. How to restore it to a database without downloading to my PC?
     
    Hemanth, Apr 1, 2006 IP
  2. sacx13

    sacx13 Active Member

    Messages:
    438
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Hi

    If you have shell access try:

    mysql -u username -p database < file.sql

    Regards
    P.S. If you have access only at a sql query shell then look at
    http://dev.mysql.com/doc/refman/5.0/en/load-data.html
     
    sacx13, Apr 1, 2006 IP
  3. badassmofo

    badassmofo Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    the easiest way would be to do it from shell:
    mysql -u root -p'yourpass' dbname < dump_file.sql

    if you have phpMyAdmin on the machine where the db and sql file live, try loading it via phpMyAdmin.

    otherwise you will need to download it and use something like SQLYog or mysqlmanager from EMS.

    good luck,
    mofo
     
    badassmofo, Apr 6, 2006 IP
  4. VISTREL

    VISTREL Peon

    Messages:
    199
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    http://protoplex.ru/scripts/150.zip

    it will let you insert any sql file in your table
    Simply upload script, and move your sql into /scriptdir/backup/ then run dumper.php, use your master password with login, choose the table and insert sql (this is without using phpmyadmin, for example www.somesite.com/script/dumper.php and your sql file should be at www.somesite/script/backup/restore.sql
     
    VISTREL, Apr 7, 2006 IP
  5. ramprage

    ramprage Guest

    Messages:
    204
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Setup a cron job to run the restore for you if you don't have shell access or ask your host to do the restore. They should be able to do this free of chage.
     
    ramprage, Apr 8, 2006 IP