MYSQL problems please help me! somebody!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • x2dio
    Confirmed User
    • Jun 2003
    • 101

    #1

    MYSQL problems please help me! somebody!

    Hi I have a .sql file I need to import into a mysql Db, the problem is I cannot do it thru MYPHPADMIN because the file is too big and my browser locks up.

    how can I do this thru ssh??


    someone plz
    <hahahahaha src="http://www.x2dio.com/sig/sig.swf" quality=high type="application/x-shockwave-flash" width="100" height="100" menu="false"></hahahahaha><br><br>x2dio.com - Design Overload - Coming Soon<br>
    203814376
  • - Jesus Christ -
    Confirmed User
    • Mar 2003
    • 7197

    #2
    I will tell you....




    for one million dollars.

    Amen

    Comment

    • CS-Jay
      Confirmed User
      • Oct 2003
      • 1794

      #3
      if my memory servers me:

      mysql -p databasename > datebasenamefile.sql

      and you have to create the database first.

      I don't have my files at home, but I think that's right.

      J
      I do stuff - aIm CS_Jay_D

      Comment

      • - Jesus Christ -
        Confirmed User
        • Mar 2003
        • 7197

        #4
        Ok the one million dollar paypal pament you made (after we arranged the details over ICQ) has been recieved.


        mysql -uUSERNAME -p newdbname < /path/to/dump.sql


        Originally posted by CS-Jay
        if my memory servers me:

        mysql -p databasename > datebasenamefile.sql

        and you have to create the database first.

        I don't have my files at home, but I think that's right.

        J
        STOP TRYING TO FUCK WITH MY BLING!

        EVEN THOUGH YOU ARE WRONG!

        Amen

        Comment

        • CS-Jay
          Confirmed User
          • Oct 2003
          • 1794

          #5
          Man, I was way off. Must be the blood in my beer system.
          I do stuff - aIm CS_Jay_D

          Comment

          • Mr.Fiction
            Confirmed User
            • Feb 2002
            • 9484

            #6
            It's impossible to do, don't even try it!
            Don't be lazy, protect free speech: ACLU | Free Speech Coalition | EFF | IMPA

            Comment

            • - Jesus Christ -
              Confirmed User
              • Mar 2003
              • 7197

              #7
              Originally posted by CS-Jay
              Man, I was way off. Must be the blood in my beer system.
              Beer makes dumb, eat musroom.

              Amen

              Comment

              • JamesK
                hi
                • Jun 2002
                • 16731

                #8
                Ok listen up.

                First create a new database in MyPHPAdmin.

                Then use telnet/ssh and connect to your server (if you don't have access, contact your host and ask them for access).

                Upload the .SQL file with FTP/Telnet to the root and then type this in telnet/ssh:

                mysql -u username -p newdbname < nameofdb.sql

                username = mysql username
                newdbname = the name of the db you just created in MyPHPAdmin
                M3Server - NATS Hosting

                Comment

                • JamesK
                  hi
                  • Jun 2002
                  • 16731

                  #9
                  And good luck
                  M3Server - NATS Hosting

                  Comment

                  • CS-Jay
                    Confirmed User
                    • Oct 2003
                    • 1794

                    #10
                    Originally posted by - Jesus Christ -
                    Beer makes dumb, eat musroom.
                    I had mushrooms on my pizza, but I drank beer....don't those two just cancel each other out?
                    I do stuff - aIm CS_Jay_D

                    Comment

                    • x2dio
                      Confirmed User
                      • Jun 2003
                      • 101

                      #11
                      Originally posted by Wildcard
                      Ok listen up.

                      First create a new database in MyPHPAdmin.

                      Then use telnet/ssh and connect to your server (if you don't have access, contact your host and ask them for access).

                      Upload the .SQL file with FTP/Telnet to the root and then type this in telnet/ssh:

                      mysql -u username -p newdbname < nameofdb.sql

                      username = mysql username
                      newdbname = the name of the db you just created in MyPHPAdmin


                      Worked Beautifully!

                      THANKS!
                      <hahahahaha src="http://www.x2dio.com/sig/sig.swf" quality=high type="application/x-shockwave-flash" width="100" height="100" menu="false"></hahahahaha><br><br>x2dio.com - Design Overload - Coming Soon<br>
                      203814376

                      Comment

                      • JamesK
                        hi
                        • Jun 2002
                        • 16731

                        #12
                        Originally posted by x2dio




                        Worked Beautifully!

                        THANKS!
                        Np I had a shitload of trouble with it before. I know how fucking annoying it is. That's the only reason I'm helping you
                        M3Server - NATS Hosting

                        Comment

                        • fuzebox
                          making it rain
                          • Oct 2003
                          • 22353

                          #13
                          Originally posted by CS-Jay
                          if my memory servers me:

                          mysql -p databasename > datebasenamefile.sql

                          and you have to create the database first.

                          I don't have my files at home, but I think that's right.
                          If you don't know, you shouldn't answer.

                          Had that been his only copy of that sql dump, it would have been wiped out.

                          Comment

                          • Ben-MensNiche
                            Confirmed User
                            • Dec 2003
                            • 726

                            #14
                            Originally posted by CS-Jay
                            if my memory servers me:

                            mysql -p databasename > datebasenamefile.sql

                            and you have to create the database first.

                            I don't have my files at home, but I think that's right.

                            J
                            That dumps the database to a .sql file named databasefilename.sql you need the pipe the other way around.

                            mysql -p databasename < databasenamefile.sql
                            Last edited by Ben-MensNiche; 01-01-2004, 05:53 PM.

                            ICQ: 310539245
                            Email: [email protected]

                            Comment

                            • x2dio
                              Confirmed User
                              • Jun 2003
                              • 101

                              #15
                              Hey guys

                              im trying to do this again now, and it seems like everything is copying over with no errors..

                              but when I got to check the database there is no data in it??

                              has that ever happened to anyone?
                              <hahahahaha src="http://www.x2dio.com/sig/sig.swf" quality=high type="application/x-shockwave-flash" width="100" height="100" menu="false"></hahahahaha><br><br>x2dio.com - Design Overload - Coming Soon<br>
                              203814376

                              Comment

                              • x2dio
                                Confirmed User
                                • Jun 2003
                                • 101

                                #16
                                bump
                                <hahahahaha src="http://www.x2dio.com/sig/sig.swf" quality=high type="application/x-shockwave-flash" width="100" height="100" menu="false"></hahahahaha><br><br>x2dio.com - Design Overload - Coming Soon<br>
                                203814376

                                Comment

                                Working...