MySQL help needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 3Xguru
    Confirmed User
    • Sep 2001
    • 1281

    #1

    MySQL help needed

    I have a large databse on my computer and I need to transfer all the data from my computer to my webserver.
    Does anyone know how to transfer such a large database between 2 MySQL databases?

    I have tried to export the database from the PHPMyAdmin pannel(with the feature that exports the database in a text file with all the inserts), but it doesn't work since the database is too big(over 50k records - about 50Mb). Any ideas? Is there a specialized software for something like this?

    Any feedback appreciated.
    -=Free Webmaster Tools=-
  • Zorgman
    Confirmed User
    • Aug 2002
    • 6103

    #2
    Upload the 50MB file to your webserver and use ssh or telnet to insert it into the mysql database.


    mysql -u username -p databasenamee < filename.sql

    Also for reference - backing up

    mysqldump -u username -p databasename > dumpfile.sql

    It's been a while since I used this way, I hope it hasn't changed at all.
    ---

    Comment

    • grumpy
      Too lazy to set a custom title
      • Jan 2002
      • 9870

      #3
      50Mb shouldnt be any problem. Zorgman is right
      Don't let greediness blur your vision | You gotta let some shit slide
      icq - 441-456-888

      Comment

      • 3Xguru
        Confirmed User
        • Sep 2001
        • 1281

        #4
        Originally posted by Zorgman
        Upload the 50MB file to your webserver and use ssh or telnet to insert it into the mysql database.


        mysql -u username -p databasenamee < filename.sql

        Also for reference - backing up

        mysqldump -u username -p databasename > dumpfile.sql

        It's been a while since I used this way, I hope it hasn't changed at all.
        Thanks for the feedback but I'm still in the dark.

        I do not have the sql file on my local computer. The only file on the MySQL database I have found is a .myd file that's 52Mb
        How do I create the sql file with the database inserts to upload to the server. The export feature on PHPMyAdmin does not seem to work with so many records.

        Also I have no idea about where to upload the SQL file
        -=Free Webmaster Tools=-

        Comment

        • HoiDaKalen
          Registered User
          • Apr 2002
          • 51

          #5
          umm, your database is stored in files. i forgot which dir, but they are there somewhere. just look around in mysql dir.

          Comment

          • Zorgman
            Confirmed User
            • Aug 2002
            • 6103

            #6
            In phpmyadmin you can dump the entire database to a file or if you have the latest version it can even zip that file.

            An .sql file is basicly just a text file. It's named .sql to tell your its a database backup or related file rather then a .txt file.

            If you have telnet or ssh use the above commands to dump your database OR you could hire someone to do it for you. There are many guys here that could help you out.
            ---

            Comment

            • 3Xguru
              Confirmed User
              • Sep 2001
              • 1281

              #7
              Originally posted by Zorgman
              In phpmyadmin you can dump the entire database to a file or if you have the latest version it can even zip that file.

              An .sql file is basicly just a text file. It's named .sql to tell your its a database backup or related file rather then a .txt file.

              If you have telnet or ssh use the above commands to dump your database OR you could hire someone to do it for you. There are many guys here that could help you out.
              I know what an SQL file is. I have also tried to dump the database using PHPMyadmin but it doesn't seem to work. I'll try to download the latest version of PHPMyAdmin and see if it works better(or if it works at all)

              Thanks for the help again!
              -=Free Webmaster Tools=-

              Comment

              • hibbidiji
                Confirmed User
                • Sep 2002
                • 208

                #8
                and dont forget what zorgman said... if you cant get phpmyadmin to do it (probably because of a time limit or file size problem in your PHP installation, you can always ssh in to the server and run
                mysqldump -u username -p databasename > dumpfile.sql
                it will ask you for a password then create dumpfile.sql... then you ftp in and download it... (it helps to put the path to your web folder or a folder you can easily ftp to in front of dumpfile.sql) then you follow zorgmans other suggestion and it will go in slick.
                d
                ---------------

                Comment

                Working...