Logo Background RSS

Restoring The Database via SSH

  • Restoring The Database via SSH

    Login with ssh on your hosting server.

    then goto mysql

    mysql -u dbusername -p databasename < backupname.sql

    • dbusername => Your database user name
    • databasename => Your Database name
    • backupname.sql (with full path where your sql file present)
    • then hit enter
    • it will ask your password of database
    • then click enter

    If your hosting company has you on a remote MySQL server, such as mysql.yourhost.com, you will need to add the servername to the command line. The servername will be the same as in your config.php. The command line will be:

    mysql -h servername -u dbusername -p databasename < backupname.sql

    Or:

    mysql -h servername -u dbusername -p databasename < /path/to/backupname.sql

    Now you guys have any difficulty post your comments here :)

  1. #1 Alexwebmaster
    March 3rd, 2009 at 11:55 pm

    Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru

    Post ReplyPost Reply
  • Trackback: Restoring The Database via SSH | BH-Server Trackbacks
  • Leave a Comment