Announcement

Collapse
No announcement yet.

Loading certain files to the forum's database

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

  • Loading certain files to the forum's database

    Can someone provide step-by-step instructions on how to load or upload sql files on my PC into the forum's database?

  • #2
    You mean a MySQL database backup file?

    First you gotta FTP it up to your server.

    Comment


    • #3
      No, I mean an .sql file that I need to upload:

      Save and Close 'drafts.sql', you now can load 'drafts.sql' into your forums database
      Generally speaking, where on my server do I upload an sql file to? (What folder on my server?)

      Comment


      • #4
        It doesn't matter. If it's a backup, when you use it, you specify the entire path to the file.

        Comment


        • #5
          Specify the url where exactly? Where in my phpmyadmin.

          Comment


          • #6
            Help from "mysqlimport:

            Code:
            mysqlimport  Ver 3.4 Distrib 4.0.23a, for redhat-linux-gnu (i686)
            Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
            This software comes with ABSOLUTELY NO WARRANTY. This is free software,
            and you are welcome to modify and redistribute it under the GPL license
            
            Loads tables from text files in various formats.  The base name of the
            text file must be the name of the table that should be used.
            If one uses sockets to connect to the MySQL server, the server will open and
            read the text file directly. In other cases the client will open the text
            file. The SQL command 'LOAD DATA INFILE' is used to import the rows.
            
            Usage: mysqlimport [OPTIONS] database textfile...
            Default options are read from the following files in the given order:
            /etc/my.cnf /usr/local/mysql/data/my.cnf ~/.my.cnf
            The following groups are read: mysqlimport 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 #
            --defaults-extra-file=# Read this file after the global files are read
              --character-sets-dir=name
            					  Directory where character sets are
              --default-character-set=name
            					  Set the default character set.
              -c, --columns=name  Use only these columns to import the data to. Give the
            					  column names in a comma separated list. This is same as
            					  giving columns to LOAD DATA INFILE.
              -C, --compress	  Use compression in server/client protocol.
              -#, --debug[=name]  Output debug log. Often this is 'd:t:o,filename'
              -d, --delete		First delete all rows from table.
              --fields-terminated-by=name
            					  Fields in the textfile are terminated by ...
              --fields-enclosed-by=name
            					  Fields in the importfile are enclosed by ...
              --fields-optionally-enclosed-by=name
            					  Fields in the i.file are opt. enclosed by ...
              --fields-escaped-by=name
            					  Fields in the i.file are escaped by ...
              -f, --force		 Continue even if we get an sql-error.
              -?, --help		  Displays this help and exits.
              -h, --host=name	 Connect to host.
              -i, --ignore		If duplicate unique key was found, keep old row.
              --ignore-lines=#	Ignore first n lines of data infile.
              --lines-terminated-by=name
            					  Lines in the i.file are terminated by ...
              -L, --local		 Read all files through the client
              -l, --lock-tables   Lock all tables for write.
              --low-priority	  Use LOW_PRIORITY when updating the table
              -p, --password[=name]
            					  Password to use when connecting to server. If password is
            					  not given it's asked from the tty.
              -P, --port=#		Port number to use for connection.
              -r, --replace	   If duplicate unique key was found, replace old row.
              -s, --silent		Be more silent.
              -S, --socket=name   Socket file to use for connection.
              -u, --user=name	 User for login if not current user.
              -v, --verbose	   Print info about the various stages.
              -V, --version	   Output version information and exit.
            
            Variables (--variable-name=value)
            and boolean options {FALSE|TRUE}  Value (after reading options)
            --------------------------------- -----------------------------
            character-sets-dir				(No default value)
            default-character-set			 (No default value)
            columns						   (No default value)
            compress						  FALSE
            delete						    FALSE
            fields-terminated-by			  (No default value)
            fields-enclosed-by				(No default value)
            fields-optionally-enclosed-by	 (No default value)
            fields-escaped-by				 (No default value)
            force							 FALSE
            host							  (No default value)
            ignore						    FALSE
            ignore-lines					  0
            lines-terminated-by			   (No default value)
            local							 FALSE
            lock-tables					   FALSE
            low-priority					  FALSE
            port							  3306
            replace						   FALSE
            silent						    FALSE
            socket						    /tmp/mysql.sock
            user							  (No default value)
            verbose						   FALSE

            Comment


            • #7
              How am I to understand that jibberish? I have the sql file or table that I need to load onto my database. I just need easy steps on how to do it from phpmyadmin.

              Comment


              • #8
                Originally posted by OrangeFlea
                How am I to understand that jibberish?
                No need to be rude to someone who was genuinely trying to help you.

                The only reliable method of backing up and restoring a database is with shell access via telnet or ssh. This is ecause backing up with a PHP script like that in the Admin CP or phpMyAdmin can result in PHP timeouts errors and an incomplete backup file. Nonetheless you can use these instructions to try and restore it with phpMyAdmin:

                http://www.vbulletin.com/docs/html/m...yadmin_restore
                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


                • #9
                  phpMyAdmin doesn't get much easier than what the docs say.

                  You can also try this for SSH.

                  http://www.vbulletin.com/forum/showp...09&postcount=7

                  Comment


                  • #10
                    I wasn't trying to be rude, I'm just eager to get this thing done is all Sorry if it was construed that way.

                    But I'm not looking to restore anything. I just want to load a new table onto my database. These were the instructions I was given:

                    Open 'drafts.sql' in a text editor!

                    Use the text editor 'Search and Replace' feature!

                    SEARCH FOR: 'xx_prefix_' (without the quotes [''])
                    REPLACE WITH: '' (without the quotes [''])

                    Save and Close 'drafts.sql', you now can load 'drafts.sql' into your forums database
                    How do I do that last part?

                    Comment


                    • #11
                      Without know what this file is and contains, it's hard to give any advice. Have you tried asking for further clarification from the person that gave you these instructions?
                      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


                      • #12
                        Sorry about the lack of information. Can you tell where the "mysql folder" that corresponds with the forum is? Is it the main forum folder? Someone told me to upload it into my mysql folder but I don't have a folder by that name.

                        Comment


                        • #13
                          There is no 'mysql folder' for you to install this to. Assuming this is a query of some sort, you would run it in the SQL tab in phpMyAdmin.

                          Again, I do not know what you are trying to do with this. I suggest asking the person who gave you the original advice for help.
                          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

                          Loading...
                          Working...
                          X