Export whole MySql database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Franz Marksteiner

    Export whole MySql database

    Hi folks,

    I am looking for the straightest way to export a whole MySql database, but
    all I can find is SQL statements to export specific tables.
    Any suggestions?

    --
    Freundliche Grüße,
    Franz Marksteiner

  • Jerry Stuckle

    #2
    Re: Export whole MySql database

    Franz Marksteiner wrote:
    Hi folks,
    >
    I am looking for the straightest way to export a whole MySql database,
    but all I can find is SQL statements to export specific tables.
    Any suggestions?
    >
    Try a mysql newsgroup - such as comp.databases. mysql. Your question has
    nothing to do with PHP.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • icu5545

      #3
      Re: Export whole MySql database

      On Feb 23, 1:28 pm, "Franz Marksteiner" <franzmarkstei. ..@gmail.com>
      wrote:
      Hi folks,
      >
      I am looking for the straightest way to export a whole MySql database, but
      all I can find is SQL statements to export specific tables.
      Any suggestions?
      >
      --
      Freundliche Grüße,
      Franz Marksteiner
      I think PHPMyAdmin will do it. That is, if you have access to that
      handy little program.

      Comment

      • Franz Marksteiner

        #4
        Re: Export whole MySql database

        Jerry Stuckle wrote:
        Franz Marksteiner wrote:
        >Hi folks,
        >>
        >I am looking for the straightest way to export a whole MySql
        >database, but all I can find is SQL statements to export specific
        >tables. Any suggestions?
        >>
        >
        Try a mysql newsgroup - such as comp.databases. mysql. Your question
        has nothing to do with PHP.
        Just because the string "PHP" does not show up in my post, does not mean
        that the post has nothing to do with it...

        So if you ain`t got a clue simply don`t answer...

        --
        Freundliche Grüße,
        Franz Marksteiner

        Comment

        • Jerry Stuckle

          #5
          Re: Export whole MySql database

          Franz Marksteiner wrote:
          Jerry Stuckle wrote:
          >Franz Marksteiner wrote:
          >>Hi folks,
          >>>
          >>I am looking for the straightest way to export a whole MySql
          >>database, but all I can find is SQL statements to export specific
          >>tables. Any suggestions?
          >>>
          >>
          >Try a mysql newsgroup - such as comp.databases. mysql. Your question
          >has nothing to do with PHP.
          >
          Just because the string "PHP" does not show up in my post, does not mean
          that the post has nothing to do with it...
          >
          So if you ain`t got a clue simply don`t answer...
          >
          Oh, I've got a clue. But you sure don't.

          This isn't a MySQL newsgroup.

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          • Jerry Stuckle

            #6
            Re: Export whole MySql database

            Franz Marksteiner wrote:
            Jerry Stuckle wrote:
            >Franz Marksteiner wrote:
            >>Hi folks,
            >>>
            >>I am looking for the straightest way to export a whole MySql
            >>database, but all I can find is SQL statements to export specific
            >>tables. Any suggestions?
            >>>
            >>
            >Try a mysql newsgroup - such as comp.databases. mysql. Your question
            >has nothing to do with PHP.
            >
            Just because the string "PHP" does not show up in my post, does not mean
            that the post has nothing to do with it...
            >
            So if you ain`t got a clue simply don`t answer...
            >
            And BTW - if you have a PHP question, what is that PHP question? All
            you've asked about is MySQL - and this is not a MySQL newsgroup.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            • Luuk

              #7
              Re: Export whole MySql database

              Franz Marksteiner schreef:
              Jerry Stuckle wrote:
              >Franz Marksteiner wrote:
              >>Hi folks,
              >>>
              >>I am looking for the straightest way to export a whole MySql
              >>database, but all I can find is SQL statements to export specific
              >>tables. Any suggestions?
              >>>
              >>
              >Try a mysql newsgroup - such as comp.databases. mysql. Your question
              >has nothing to do with PHP.
              >
              Just because the string "PHP" does not show up in my post, does not mean
              that the post has nothing to do with it...
              >
              So if you ain`t got a clue simply don`t answer...
              >
              system("mysqldu mp <...parameters. ..>");


              for correct '<...parameters ...>' please ask in some MySQL newsgroup ;-)

              --
              Luuk

              Comment

              • Michael Fesser

                #8
                Re: Export whole MySql database

                ..oO(Franz Marksteiner)
                >Just because the string "PHP" does not show up in my post, does not mean
                >that the post has nothing to do with it...
                What does dumping a DB to a file have to do with PHP?

                Micha

                Comment

                • The Natural Philosopher

                  #9
                  Re: Export whole MySql database

                  Franz Marksteiner wrote:
                  Hi folks,
                  >
                  I am looking for the straightest way to export a whole MySql database,
                  but all I can find is SQL statements to export specific tables.
                  Any suggestions?
                  >
                  If its on linux, simply go into /var/lib/mysql/databasename and tar the
                  lot up..if you want a duplicate setup.

                  I believe that UNLOAD or DUMP will give you a format that you can use to
                  extract data from..

                  Comment

                  • Jerry Stuckle

                    #10
                    Re: Export whole MySql database

                    The Natural Philosopher wrote:
                    Franz Marksteiner wrote:
                    >Hi folks,
                    >>
                    >I am looking for the straightest way to export a whole MySql database,
                    >but all I can find is SQL statements to export specific tables.
                    >Any suggestions?
                    >>
                    If its on linux, simply go into /var/lib/mysql/databasename and tar the
                    lot up..if you want a duplicate setup.
                    >
                    This is not at all safe!

                    I believe that UNLOAD or DUMP will give you a format that you can use to
                    extract data from..
                    >

                    --
                    =============== ===
                    Remove the "x" from my email address
                    Jerry Stuckle
                    JDS Computer Training Corp.
                    jstucklex@attgl obal.net
                    =============== ===

                    Comment

                    • The Natural Philosopher

                      #11
                      Re: Export whole MySql database

                      Jerry Stuckle wrote:
                      The Natural Philosopher wrote:
                      >Franz Marksteiner wrote:
                      >>Hi folks,
                      >>>
                      >>I am looking for the straightest way to export a whole MySql
                      >>database, but all I can find is SQL statements to export specific
                      >>tables.
                      >>Any suggestions?
                      >>>
                      >If its on linux, simply go into /var/lib/mysql/databasename and tar
                      >the lot up..if you want a duplicate setup.
                      >>
                      >
                      This is not at all safe!
                      >
                      It is if you stop the mysqld daemon first.

                      At that point the daemon cleans all up, and flushes all its caches.

                      You will have a consistent database.
                      >
                      >I believe that UNLOAD or DUMP will give you a format that you can use
                      >to extract data from..
                      >>
                      >
                      >

                      Comment

                      • Michael Fesser

                        #12
                        Re: Export whole MySql database

                        ..oO(The Natural Philosopher)
                        >Jerry Stuckle wrote:
                        >The Natural Philosopher wrote:
                        >>
                        >>If its on linux, simply go into /var/lib/mysql/databasename and tar
                        >>the lot up..if you want a duplicate setup.
                        >>>
                        >>
                        >This is not at all safe!
                        >>
                        >
                        >It is if you stop the mysqld daemon first.
                        No. It's like copying raw inodes instead of using the appropriate higher
                        level tools for copying files.
                        >At that point the daemon cleans all up, and flushes all its caches.
                        >
                        >You will have a consistent database.
                        But maybe with broken or no data at all. Not everyone uses MyISAM
                        tables. And even with MyISAM there are some things that may screw up
                        your data in such an operation.

                        The correct way is mysqldump, that's what this tool is for.

                        Micha

                        Comment

                        • Anonymous

                          #13
                          Re: Export whole MySql database

                          The Natural Philosopher wrote:
                          If its on linux, simply go into /var/lib/mysql/databasename and tar
                          the lot up..if you want a duplicate setup.
                          >
                          This is not at all safe!
                          >
                          It is if you stop the mysqld daemon first.
                          >
                          At that point the daemon cleans all up, and flushes all its caches.
                          >
                          You will have a consistent database.
                          No, Jerry is right. The method you suggested only works with the MyISAM
                          storage engine.

                          With any other storage engine (InnoDB comes to mind, which is the most
                          commonly used today because it supports transactions) your method leads
                          to data loss. I learned that the hard way.

                          Bye!

                          Comment

                          • Jerry Stuckle

                            #14
                            Re: Export whole MySql database

                            The Natural Philosopher wrote:
                            Jerry Stuckle wrote:
                            >The Natural Philosopher wrote:
                            >>Franz Marksteiner wrote:
                            >>>Hi folks,
                            >>>>
                            >>>I am looking for the straightest way to export a whole MySql
                            >>>database, but all I can find is SQL statements to export specific
                            >>>tables.
                            >>>Any suggestions?
                            >>>>
                            >>If its on linux, simply go into /var/lib/mysql/databasename and tar
                            >>the lot up..if you want a duplicate setup.
                            >>>
                            >>
                            >This is not at all safe!
                            >>
                            >
                            It is if you stop the mysqld daemon first.
                            >
                            Not necessarily.
                            At that point the daemon cleans all up, and flushes all its caches.
                            >
                            Not always.
                            You will have a consistent database.
                            >
                            Nope.
                            >>
                            >>I believe that UNLOAD or DUMP will give you a format that you can use
                            >>to extract data from..
                            >>>
                            >>
                            >>
                            >
                            Which is *EXACTLY* why people should ask questions in an appropriate
                            newsgroup. You will get good answers in comp.database.m ysql. The MySQL
                            experts hang out there.

                            --
                            =============== ===
                            Remove the "x" from my email address
                            Jerry Stuckle
                            JDS Computer Training Corp.
                            jstucklex@attgl obal.net
                            =============== ===

                            Comment

                            • The Natural Philosopher

                              #15
                              Re: Export whole MySql database

                              Anonymous wrote:
                              The Natural Philosopher wrote:
                              >
                              >>>If its on linux, simply go into /var/lib/mysql/databasename and tar
                              >>>the lot up..if you want a duplicate setup.
                              >>>>
                              >>This is not at all safe!
                              >>>
                              >It is if you stop the mysqld daemon first.
                              >>
                              >At that point the daemon cleans all up, and flushes all its caches.
                              >>
                              >You will have a consistent database.
                              >
                              No, Jerry is right. The method you suggested only works with the MyISAM
                              storage engine.
                              Ok, I concede that point all right.
                              >
                              With any other storage engine (InnoDB comes to mind, which is the most
                              commonly used today because it supports transactions) your method leads
                              to data loss. I learned that the hard way.
                              >
                              Bye!

                              Comment

                              Working...