Announcement

Collapse
No announcement yet.

How Do I Restore My Database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How Do I Restore My Database

    Ok, don't yell at me for not knowing anything about telnet....but I tried to restore my .SQL file on my hard drive, and got numerous errors, you can laugh all you want because some of the stuff I'm about to say is newbie.

    first....I have Windows 2000....I go into "command.exe".....and execute it, giving me a little black window with a C:\>

    I type: ftp

    It gives me a: ftp>

    then it asks for my username and password when I login to my IP address of the server that has vbulletin installed on it... so I enter it, then I'm in. I have the SQL file sitting on my hard drive, and in a directory on my server @: /forums/forum.sql

    I create a new database called "forum_here".....but what I have a problem with is getting my SQL file restored.

    what do I type at the "ftp>"?

    ftp> mysql -uUSERNAME -pPASSWORD newdbname < /path/to/dump.txt right?

    I don't have a "dump.txt"....I just have a file I got when I backed the databse up thru the admin CP.

    Really, what I've done to start was I went into the Admin CP and backed everything up, I did a dump and saved it on my hard drive, that's what I'm trying to restore, I'm not transferring it from domain to domain thru telnet, but rather transferring it from server1, to my hard drive, then to server2., I just want to restore it...I have absolutely no clue how to telnet, and everytime I type "mysql" at the "ftp>" prompt, it says "invalid command"


    the following commands work though:

    Commands may be abbreviated. Commands are:

    ! delete literal prompt send
    ? debug ls put status
    append dir mdelete pwd trace
    ascii disconnect mdir quit type
    bell get mget quote user
    binary glob mkdir recv verbose
    bye hash mls remotehelp
    cd help mput rename
    close lcd open rmdir



    Any help on what to do next would be greatly appreciated....
    Last edited by Crystallized; Thu 7 Jun '01, 12:41am.

  • #2
    You can't run commands like mysql from an ftp prompt... you need to log in via telnet or ssh to restore the backup file.

    Comment


    • #3
      Help me please!!!

      Can you please explain to me how to do it, instead of just replying to my post with no directions?

      Comment


      • #4
        These instructions here should help: http://161.58.84.213/manual/movingservers.html

        Comment


        • #5
          ugghh.....this is making me mad because I don't know jack about telnet....here, I copied and pasted a line from that link you sent me, this is the step I'm stuck on.

          telnet into machine
          create new database on the mysql (either via phpMyAdmin or telnet)
          from the root, type mysql -uUSERNAME -pPASSWORD newdbname < /path/to/dump.sql


          How the F&%* do I get to the root? I mean, this whole article was written for newbies, you need a frickin article that explains what everything is, you're only assuming I know how to get to "root"....please tell me how, because everytime I type "mysql" in at any prompt I get, I always get some sort of "invalid" error.

          Comment


          • #6
            Assuming you're on a shared host, you won't be able to switch to root. Once you get in via telnet, just type the command

            mysql -uUSERNAME -pPASSWORD databasename < /home/mysitename/backup.sql

            You will need to use FTP to transfer the backup.sql file to your server first - place it one directory above the public_html or www directory so it is not publicly accessible.

            When finished with the command, it will return you to the prompt.

            Comment


            • #7
              ok, I got my root thingy working, but now everytime I type in "mysql" at the root prompt, it says "command not found"

              Comment


              • #8
                Try to type in "locate mysql" or "whereis mysql". It should list the full path to where mysql is located. If it prints something like /usr/local/mysql/bin/mysql, then use this command:

                /usr/local/bin/mysql/bin/mysql -uUSER -pPASSWORD DATABASE < /home/mysite/backup.sql

                Comment


                • #9
                  It says /usr/local/mysql when I typed in "whereis mysql"

                  so what would my command be?

                  my sql file is in the root, at /myforum.sql

                  Comment

                  Loading...
                  Working...
                  X