Announcement

Collapse
No announcement yet.

Moving entire database

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

  • Moving entire database

    I'm going to need to move my entire database (which has vBulletin and a few other things) over to a different server.

    Anyone know how to go about doing that?
    Motorsport Forums

  • #2
    Hi ya

    I cannot help you, but I am in a similar predicament.

    You see, my vbulletin files are on one server, and my MySQL data is on the other (urm.. I know it isn't efficiant).
    I want to move the vbulletin files to the same server as the MySQL database... what would I need to edit to get this working?

    --WildWayz

    Comment


    • #3
      Mark Hewitt,

      You could use phpMyAdmin to do a dump of the database and then use it to insert it into a database of the same name on the new server, and do that for each database.

      Or you could achieve this by dumping the database, and then putting the file on the new server, create the database, then use something like this through telnet to import it:



      mysql <dbname> < <sqlfile>


      where:
      <dbname>=name of database
      <sqlfile>=file with sql in
      We're Here Forums!
      aaron@webstyles.net

      Comment


      • #4
        WildWayz,

        You should just be able to move all of the php files to the server with mysql, and change the config file accordingly. I believe it should be that easy.
        We're Here Forums!
        aaron@webstyles.net

        Comment


        • #5
          Is there anyway to get a script to do this?

          Is there anyway to get a script to move a vb board from one location to another?
          "The best time to sleep is just before waking up."

          --Shoebuddy Jones

          Comment


          • #6
            All you need is ftp access, and MySQL telnet access, and of course you need to be able to create a new database on the new server. Or you could use phpMyAdmin to do this.

            I actually am moving to a new server and just moved my whole forum (only a test) to the new server and it seemed to work flawlessly.
            We're Here Forums!
            aaron@webstyles.net

            Comment


            • #7
              [QUOTE][i]Originally posted by werehere [/i]
              [B]All you need is ftp access, and MySQL telnet access, and of course you need to be able to create a new database on the new server. Or you could use phpMyAdmin to do this.

              I actually am moving to a new server and just moved my whole forum (only a test) to the new server and it seemed to work flawlessly. [/B][/QUOTE]

              Would you mind spelling out the steps. Since you were able to do this, it would help us who are wanting to do this.

              Thanks :)
              "The best time to sleep is just before waking up."

              --Shoebuddy Jones

              Comment


              • #8
                Well since I do not know what access you have it is a little difficult to do, but here is exactely how I did it.

                First I used phpMyAdmin (a great tool) and selected my forum database, then I choose the dump data and structure option (which is the backup) and downloaded it to my hardrive. Then I uploaded it to my new server through ftp. Then I opened a telnet session and used:

                mysql forum < /path/to/vbulletin.sql


                So you just have to simply type the path and name of the .sql file (which is what it is backed up as). Also "forum" in my example above should be changed to whatever your database name is, mine is simply forum.

                All done, and then be sure and update your general settings to reflect any new domain name, or IP address.:)



                [Edited by werehere on 06-06-2000 at 01:43 PM]
                We're Here Forums!
                aaron@webstyles.net

                Comment


                • #9
                  If the MySQL server is staying in the same place this will be easy:
                  [list=1][*]Upload all the vBulletin scripts onto the destination server, [b]except[/b] the config.php, install.php, installtemplate.php and upgrade.php files.[*]Download the config.php file off the old server, and upload it to the new one. You should not need to make any changes to this.[*]That's it![/list=1]

                  John
                  John Percival

                  Artificial intelligence usually beats real stupidity ;)

                  Comment


                  • #10
                    Thanks for filling that in John. I seem to forget that there are so many shared mysql servers out there now :)
                    We're Here Forums!
                    aaron@webstyles.net

                    Comment


                    • #11
                      Ok, here's my problem...

                      I need to get the data out of MySQL and transfer it to another webhost.
                      I was given a dedicated server by the webhost where the MySQL is housed.
                      vBulletin is on this new server (I mean the database files, not the files that were in the zip - that is on another webhost).
                      The webhost has, after almost a week of giving me it, failed to setup the server properly, and as such, I cannot install phpMySQL onto it.
                      Apache isn't setup correctly etc.

                      I can telnet into the server as root/admin users.
                      What would the commands be to manually backup the forums? I have the database installed as forums .

                      I am going to ditch that webhost and go with [url]http://www.wantsomegetsome.com[/url] - I have one domain with them and they seem good - excellent support etc

                      Thanks

                      James

                      [Edited by WildWayz on 06-07-2000 at 08:32 AM]

                      Comment


                      • #12
                        in the mysql directory:

                        mysqldump [OPTIONS] database [tables] > savefile.dump.sql

                        =====

                        [code]

                        mysqldump Ver 7.1 Distrib 3.22.32, for pc-linux-gnu (i686)
                        By Igor Romanenko, Monty, Jani & Sinisa. This software is in public Domain
                        This software comes with ABSOLUTELY NO WARRANTY

                        Dumping definition and data mysql database or table
                        Usage: mysqldump [OPTIONS] database [tables]

                        -a, --all Include all MySQL specific create options
                        -#, --debug=... Output debug log. Often this is 'd:t:o,filename`
                        -?, --help Display this help message and exit.
                        -c, --complete-insert Use complete insert statements.
                        -C, --compress Use compression in server/client protocol
                        -e, --extended-insert Allows utilization of the new, much faster
                        INSERT syntax
                        --add-drop-table Add a 'drop table' before each create
                        --add-locks Add locks around insert statements
                        --allow-keywords Allow creation of column names that are keywords
                        --delayed-insert Insert rows with INSERT DELAYED
                        -F --flush-logs Flush logs file in server before starting dump
                        -f, --force Continue even if we get an sql-error.
                        -h, --host=... Connect to host.
                        -l, --lock-tables Lock all tables for read.
                        -t, --no-create-info Don't write table creation info.
                        -d, --no-data No row information.
                        -O, --set-variable var=option
                        give a variable a value. --help lists variables
                        --opt Same as --add-drop-table --add-locks --all
                        --extended-insert --quick --lock-tables
                        -p, --password[=...] Password to use when connecting to server.
                        If password is not given it's solicited on the tty.
                        -P, --port=... Port number to use for connection.
                        -q, --quick Don't buffer query, dump directly to stdout.
                        -Q, --quote-names Quote table and column names with `
                        -S, --socket=... Socket file to use for connection.
                        -T, --tab=... Creates tab separated textfile for each table to
                        given path. (creates .sql and .txt files).
                        NOTE: This only works if mysqldump is run on
                        the same machine as the mysqld daemon.
                        -u, --user=# User for login if not current user.
                        -v, --verbose Print info about the various stages.
                        -V, --version Output version information and exit.
                        -w, --where= dump only selected records; QUOTES mandatory!
                        EXAMPLES: "--where=user='jimf'" "-wuserid>1" "-wuserid<1"
                        Use -T (--tab=...) with --fields-...
                        --fields-terminated-by=...
                        Fields in the textfile are terminated by ...
                        --fields-enclosed-by=...
                        Fields in the importfile are enclosed by ...
                        --fields-optionally-enclosed-by=...
                        Fields in the i.file are opt. enclosed by ...
                        --fields-escaped-by=...
                        Fields in the i.file are escaped by ...
                        --lines-terminated-by=...
                        Lines in the i.file are terminated by ...

                        Default options are read from the following files in the given order:
                        /etc/my.cnf ~/.my.cnf
                        The following groups are read: mysqldump client
                        The following options may be given as the first argument:
                        --print-defaults Print the program argument list and exit
                        --no-defaults Don't read default options from any options file
                        --defaults-file=# Only read default options from the given file #

                        [/code]

                        [Edited by wandrer on 06-07-2000 at 09:24 AM]

                        Comment


                        • #13
                          Just to clarify a bit what Wandrer said:

                          Telnet in and find the MySQL programs directory (usually /usr/local/mysql/bin )
                          Run this command:

                          mysqldump <dbname> > /forum.sql

                          Where <dbname> is the name of the database of vBulletin.

                          You should then transfer this forum.sql file onto the new server.

                          Find the MySQL programs directory through Telnet on the new server.

                          Run this command:

                          mysqladmin create <dbname>
                          mysql <dbname> /forum.sql

                          And you're done.

                          John
                          John Percival

                          Artificial intelligence usually beats real stupidity ;)

                          Comment


                          • #14
                            hi John,

                            When I run

                            mysql vbulletin forum.sql (forum.sql is the name of the dump) it just prints out a long syntax.

                            --James

                            Comment


                            • #15
                              you hafta make sure you're in the mySQL folder and your syntax should be:

                              mysql vbulletin < forum.sql
                              Webmaster:
                              @forumz

                              Comment

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