Announcement

Collapse
No announcement yet.

In need of Putty help!

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

  • In need of Putty help!

    Think I have too many balls in the air, but here goes

    Managed to get (sort of) to grips with ssh for my backup. Have the sql in a folder - it's in notepad form, hope that's right.



    ****

    You will need to upload your database file to your web space.
    You can use SSH to telnet into the account and use the following command:

    mysql -u database_username -p database_name < filename

    For example, if your database username is foo and your database file foo.sql, you would use: mysql -u foo -p foodb < foo.sql

    *******

    But every time I follow this, Putty tells me no such file exists. that < foo.sql bit doesn't indicate where you have the sql file placed on your hard drive. Should it?

    Thanks

  • #2
    You need to be in the directory containing the backup file for this to work.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      You need to be in the directory containing the backup file for this to work.
      Arggh! Can't be doing this right. I've put ????.sql in a directory I named ???? files, then put putty in that directory and opened it from there. But still . . . .
      "No such file or directory exists" it tells me. Can you help some more? Thanks.

      Comment


      • #4
        Have you uploaded the .sql file via FTP, logged in with Putty and tried it? What I usually do (and it takes a lot longer, but I at least know its working) is log directly into mysql and execute the sql file from the SSH session/Putty. I would login to mysql with mysql -uMYUSERNAME -p, select my database (USE vBulletin, and then execute \. /home/mydir/myuploadfolder/mysqlbackup.sql. This will line-for-line execute any SQL statement in the .sql file into the database I'm using. Often it takes a considerable amount of time - 30 minutes to an hour - but I at least know it's working properly and I can keep any eye open for any odd behaviour.
        To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson

        Comment


        • #5
          Have you uploaded the .sql file via FTP, logged in with Putty and tried it?
          Whoops!
          Er, tried uploading the .sql file once, putting it in the forum directory but nothing happened. I'll try the easy version then that other more complicated version you mentioned soon as I've got hang of it. Thanks for the swift reply

          Comment


          • #6
            Still doing something wrong here!

            This time I've uploaded Putty into my public_html folder and ran programme from there - hope that's okay! If that's right so far, do I put it in the "forum" folder where my vbullttin is? However, still getting message saying "directory doesn't exsist or can't be found" Mt .sql file is also upload to mu public_html folder. Can't seem get get inside my head what Putty actually does that my FTP programme doesn't, and how where my .sql file actually fits into the train of events? Can anyone help me further. Go to go out now but I'll try again tonight. Thanks in advance.

            Comment


            • #7
              Originally posted by Rains
              Still doing something wrong here!

              This time I've uploaded Putty into my public_html folder and ran programme from there - hope that's okay! If that's right so far, do I put it in the "forum" folder where my vbullttin is? However, still getting message saying "directory doesn't exsist or can't be found" Mt .sql file is also upload to mu public_html folder. Can't seem get get inside my head what Putty actually does that my FTP programme doesn't, and how where my .sql file actually fits into the train of events? Can anyone help me further. Go to go out now but I'll try again tonight. Thanks in advance.
              Putty is an SSH program, so you can get into the root of the server you are on.

              Comment


              • #8
                You need to be in the directory containing the backup file for this to work.
                This I fear is my problem
                As sugested I've put the .sql file on the server and tried that way but still I must be doing something wrong. I've read countless threads about this but the more I read them the more confused I seem to get.

                *****
                You will need to upload your database file to your web space.
                You can use SSH to telnet into the account and use the following command:


                mysql -u database_username -p database_name < filename

                For example, if your database username is foo and your database file foo.sql, you would use: mysql -u foo -p foodb < foo.sql
                ********

                When I put the command line into putty and press enter it still keeps telling me there is no file or directory. Tell you, been at this many many hours
                Help anyone?





                Each time i enter the


                I've also tried the not recomended phpmy admin route but it timed out - thought I'd give it a go.

                Comment


                • #9
                  As I said, you need to be in the directory containing the backup file for this to work.
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment


                  • #10
                    As I said, you need to be in the directory containing the backup file for this to work.
                    Are you saying the putty.exe programme needs to be in the directory of lets say D;\????.sql and then run from there? If so I have tried that. Clearly I am still doing something wrong. It's non too helpfull for you to just glibbly repeat the same sentence which neither helps me or makes me feel too comfortable when coming to this board for help.

                    Comment


                    • #11
                      You need to execute your 'mysql' command from the server directory the backup file is in.

                      So if your file is in /home/www/public_html you would do this

                      Code:
                      cd /home/www/public_html
                      mysql -u username -p password < backupfile

                      Comment


                      • #12
                        You need to execute your 'mysql' command from the server directory the backup file is in.

                        So if your file is in /home/www/public_html you would do this


                        Code:
                        cd /home/www/public_htmlmysql -u username -p password < backupfile
                        Ah, ah! Didn't realise I could do a cd using that Putty.exe. For some reason I thought you could only put in . . .never mind I'll go and try. Thank you Praxin, starting to make sense to me now why I couldn't get past this point

                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...
                        X