Announcement

Collapse
No announcement yet.

Backup question peepz !!!

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

  • Backup question peepz !!!

    Hi all

    I have made a backup.sql in my webspace.

    I actually hada problem in my current database and now want to COMLETELY remove that and use my back.sql as my new database.

    How can this be done ? I have access trhough telnet so any telnet commands I need would also help . Please can u expain each variable as I am a newbie at all this

    Thanx all, hope some replies will come trhough soon as im dwiddling my thumbs to get on with it

    byee

  • #2
    The easiest way is to just create a new database (from mysql, CREATE DATABASE dbname; ) and import the dump (mysql -uuser -ppassword dbname < /path/to/backup.sql)

    Alternatively, if you can't create databases, you'll have to delete all the tables from the database ( DROP TABLE tablename; )and then import the dump.

    (You may not have to drop all the tables as you may have DROP TABLE IF EXISTS queries in your dump. You can try importing without dropping, but if you get errors, you'll have to drop the tables)

    Comment


    • #3
      wat EXACTLY is the command in telnet to DROP ALL TABLES ?


      And when ive done that, how do i import the backup.sql on my server ?? What are the EXACT commands for this on telnet


      Can you also tell me pls how I can find out my bbname ?? I dont know it

      THANX

      Comment


      • #4
        There is no command to drop all tables, unless you want to drop and recreate the database:

        DROP DATABASE dbname;
        CREATE DATABASE dbname;

        Otherwise you have to drop all tables individually (command in last message).

        The command to import is also in the last message.

        BBName is something you enter in your options...

        Comment


        • #5
          I cant seem to find my dbname anywhere

          where can i see this from the vbulletin cpl ????? or any other way

          thanx

          Comment


          • #6
            Your dbname is in your config.php.

            Comment


            • #7
              ah
              found it, thanx

              but i put the command

              DROP DATABASE mydbname

              into telnet but it didnt work as it said command not found

              i also tried DROP COMMAND mydbname;

              still didnt work ??

              anything im doing wrong ?

              Comment


              • #8
                You may have to log into mysql server through telnet server.

                Comment


                • #9
                  You have to run those from the mysql client:
                  mysql -uuser -ppassword

                  mysql> will then appear.

                  You can run the DROP DATABASE command from there. To drop tables you have to pick your database (use dbname; )

                  Comment


                  • #10
                    lol

                    hmm... so wat command will I need to PICK the database up to drop it

                    PICK DATABASE dbname;

                    ??

                    is that right ? Im guessing here.

                    I havent yet managed to get into mysql, says access denied. Im just making sure my password /username are correct.

                    Thanx so far to everyone who has help !!!!!!

                    Comment


                    • #11
                      Originally posted by Cyrus
                      lol

                      hmm... so wat command will I need to PICK the database up to drop it

                      PICK DATABASE dbname;

                      ??

                      is that right ? Im guessing here.

                      I havent yet managed to get into mysql, says access denied. Im just making sure my password /username are correct.

                      Thanx so far to everyone who has help !!!!!!
                      Hmm, Ed said everything you need to know already but I am mentioning again.

                      DROP DATABASE dbname; is the command.

                      Comment


                      • #12
                        ok ....

                        hmm ...... i got into my sql bit in telnet

                        I did DROP DATABASE dbnam;

                        but it said there is no db called what i specified

                        i am sure its right

                        Also, the commands u have gave do not show the backup.sql file being used anywhere

                        ??

                        thanx

                        Comment


                        • #13
                          ok peeps,

                          i fixed the problem above, seems all i needed to do was CREAT DATABASE dbname;

                          that worked

                          but when i typed in the mqsql command :0

                          mysql -uusername -ppassword dbname < backup.sql

                          it gave me a blacnk line
                          thats it

                          i waited for about 10 mins, nothing happened.

                          the backup file is about 4mb

                          that isnt much, rite ?

                          What shall I do !!! ?!?!? Pleaseeeeeeee help mua

                          thanx all

                          Comment


                          • #14
                            well, try it this way then:

                            mysql -uuser -p dbname < /full/path/to/backup.sql

                            It should prompt your for a password -- enter it and press enter. It should import the backup.

                            If you have a large database, sometimes you can check progress with phpMyAdmin That's what I've done occasionally.

                            Comment


                            • #15
                              Hi Ed

                              thanx for the help !

                              well, i eentered the command u sid and it asked for the password, i typed it in and then it paushed and gave me the command prompt again. Nothing seems to have happend.

                              how do i knwo when the backup is imported properly ?

                              and also, how can i get phpmyadmin ??

                              thanx

                              Comment

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