MySQL uploads

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mediastar
    Junior Member
    • Dec 2007
    • 6

    #1

    MySQL uploads

    MySQL upload file sizes appear to be limited by the upload data speed as the upload interrupts in phpMyAdmin after about five minutes.

    In my case this limits file sizes to about 8MB as my upload speed is about 300KB/sec.

    I've just spotted this broadband provider which claims to be able to provide upload speeds of up to 2.5MB on my phone line.



    If the actual upload speed approached this what could I expect as the maximum file size on MySQL uploads? Could I expect 60MB or would some other constraint kick in?
    Last edited by mediastar; 02-02-2008, 09:19 AM. Reason: edit phpMyAdmin spelling
  • AndrewT
    Administrator
    • Mar 2004
    • 3655

    #2
    What do you mean by MySQL uploads exactly? Are you upload files via a PHP script or are these MySQL dump files that you're trying to upload/restore via phpMyAdmin?

    Comment

    • mediastar
      Junior Member
      • Dec 2007
      • 6

      #3
      I mean using phpMyAdmin to transfer database files from my PC to say the Dathorn server.

      This could be say to transfer an existing database to Dathorn or just to check that a backup copy works OK.

      At present the maximum file sizes of the database files I have are limited to about 8MB as I want to transfer them without interruption.

      Comment

      • ZYV
        Senior Member
        • Sep 2005
        • 315

        #4
        I would upload the dump via FTP, then login via SSH and restore the dump using something like
        Code:
        nice -n 9 mysql -u blah -p < mydump.sql
        As far as I know this is the less harmful manner of restoring huge mySQL backups on shared server.

        P.S. And it works no matter what your upload speed and current server load is.

        Comment

        • AndrewT
          Administrator
          • Mar 2004
          • 3655

          #5
          ZYV is correct. Definitely upload the dump file via FTP and restore it via SSH. There are no size limitations with this and it is much better than restoring via phpMyadmin.

          Comment

          • mediastar
            Junior Member
            • Dec 2007
            • 6

            #6
            Thanks ZYV and Andrew.

            I've never used SSH but I'll try it.

            In the code
            Code:
            nice -n 9 mysql -u blah -p < mydump.sql
            which bits would have to be changed to relate to my account?

            If the file name was say smf.sql.gz would that replace mydump.sql?

            And would you dump the entire database in one file?

            Comment

            • AndrewT
              Administrator
              • Mar 2004
              • 3655

              #7
              That command is used for restoring a database from a dump file, not dumping a database to a file.

              nice -n 9 mysql -u MYSQL_USER -p < ./DUMP_FILE

              Replace MYSQL_USER with your mysql username and DUMP_FILE with the name of the file (assuming that you execute this command in the same directory that you uploaded the file to).

              Comment

              • ZYV
                Senior Member
                • Sep 2005
                • 315

                #8
                mediastar, you would either upload the uncompressed dump file, or unpack it straight on the server. From the memory, to unpack the file.gz archive you need to

                Code:
                nice -n 9 gunzip ./file.gz
                [b]OR[/b]
                nice -n 9 gzip -d ./file.gz
                If you need to create a dump file, you need the mysqldump command.

                Comment

                • mediastar
                  Junior Member
                  • Dec 2007
                  • 6

                  #9
                  Thanks again.

                  Are these commands - creating the dump file - restoring the dump - done at SSH/Java SSH Login in the control panel or somewhere else?

                  Comment

                  • AndrewT
                    Administrator
                    • Mar 2004
                    • 3655

                    #10
                    They are done via SSH. You should use an actual SSH client to connect. PuTTY is a free and popular SSH client.

                    Comment

                    • ZYV
                      Senior Member
                      • Sep 2005
                      • 315

                      #11
                      In fact you may use the Java SSH client provided by cPanel, but PuTTY or OpenSSH are more preferable.

                      Comment

                      • mediastar
                        Junior Member
                        • Dec 2007
                        • 6

                        #12
                        Thanks - I've set up some PuTTY software and reached this message from the Dathorn server.

                        This computer system is for authorized users only. All activity is logged and regulary checked by systems personal. ...
                        [mylogin@cpanel6x ~]$


                        Is this the stage where the above commands can be inserted?

                        Could you recommend some background on PuTTY and SSH so I can get a better understanding on them?
                        Last edited by mediastar; 02-04-2008, 05:34 AM.

                        Comment

                        • ZYV
                          Senior Member
                          • Sep 2005
                          • 315

                          #13
                          Well, actually you now reached the server shell prompt, which means you are now operating a remote Unix machine. There is no special background on PuTTY or SSH, but rather you need some very basic Linux user skills.

                          I can't recommend you a specific manual, but with a quick Google search I came up with this tutorial: http://www.linuxcommand.org/learning_the_shell.php which seems to be appropriate for the beginners. Actually you need chapters 1-3.

                          So, back to the topic. If you run ll (type ll and press Enter) you will discover, that you see the very same directories and files that you are used to while logging in via FTP. You may now run the command to restore the dump we discussed earlier, if you have already uploaded the uncompressed .sql file.

                          Comment

                          • mediastar
                            Junior Member
                            • Dec 2007
                            • 6

                            #14
                            Many thanks ZYV.

                            The ll command works fine. I'll check through the Linux command links you recommend.

                            Comment

                            Working...