Announcement

Collapse
No announcement yet.

How do I copy my one database into another?

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

  • How do I copy my one database into another?

    I've got my vBulletin database, and an empty database both on the same server with the same username/password. How can I easily copy everything from one DB to the other?
    Seriously! - The Definitive Home of All Things Serious
    Seriously! Forums

    To recieve support on these forums, enter your username here.

  • #2
    mysqldump -uusername -ppassword dbname > dumpfile.sql

    mysql -uusername -ppassword newdbname < dumpfile.sql

    Comment


    • #3
      I don't have SSH access.
      Seriously! - The Definitive Home of All Things Serious
      Seriously! Forums

      To recieve support on these forums, enter your username here.

      Comment


      • #4
        telnet? any sort of command line access?

        Comment


        • #5
          I have access to MySQL itself through port 3306(or whatever the default port is)
          Seriously! - The Definitive Home of All Things Serious
          Seriously! Forums

          To recieve support on these forums, enter your username here.

          Comment


          • #6
            you'll need to ask your web host to do a mysqldump into your root directory and download and upload to new server and then ask your new host to do a mysql import of that dump to a new database
            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
            :: Nginx SPDY SSL - World Flags Demo [video results]
            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

            Comment


            • #7
              *ahem*

              I've got my vBulletin database, and an empty database both on the same server with the same username/password. How can I easily copy everything from one DB to the other?
              Seriously! - The Definitive Home of All Things Serious
              Seriously! Forums

              To recieve support on these forums, enter your username here.

              Comment


              • #8
                Originally posted by DarkReaper
                *ahem*





                then Jakeman's post is the right way except use the --opt option in mysqldump and DO NOT pass the password on the same line! especially if you're on a shared server!

                mysqldump --opt -u username -p dbname > dumpfile.sql

                mysql -uusername -p newdbname < dumpfile.sql
                :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                :: Nginx SPDY SSL - World Flags Demo [video results]
                :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                Comment


                • #9
                  I don't have telnet/SSH access though...
                  Seriously! - The Definitive Home of All Things Serious
                  Seriously! Forums

                  To recieve support on these forums, enter your username here.

                  Comment


                  • #10
                    Originally posted by DarkReaper
                    I don't have telnet/SSH access though...
                    Dump them and get a host that does allow it.
                    Motorsport Forums

                    Comment


                    • #11
                      Originally posted by DarkReaper
                      I don't have telnet/SSH access though...
                      then you need to ask your web host to do the mysqldump and mysql import or better yet get a host which does have telnet access
                      :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                      :: Nginx SPDY SSL - World Flags Demo [video results]
                      :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                      Comment


                      • #12
                        Dump them? I wish. They're a good host, but not flexible enough. But the key thing is its free. Banners aren't paying enough right now to dump them.
                        Seriously! - The Definitive Home of All Things Serious
                        Seriously! Forums

                        To recieve support on these forums, enter your username here.

                        Comment


                        • #13
                          Hmmm, well, you'll need some kind of command-line access. I dunno if it 's just me, but even something like phpMyAdmin won't work (I can never get my uploaded .sql file to upload proberly through it). If you can't get command-line access, and your host won't do it for you, I don't think there's anything you can do.

                          I might ask, though: why do you need to move it all over if it's got the same username/password, and is on the same server? Won't it just be...well...the same?
                          Movie Forums - Now With 28% More Bruce Willis

                          Comment


                          • #14
                            It'd be the same, but on a different database. So I could hack things without worrying about screwing anything up.
                            Seriously! - The Definitive Home of All Things Serious
                            Seriously! Forums

                            To recieve support on these forums, enter your username here.

                            Comment

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