Reading Dump

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yasmine
    New Member
    • Feb 2008
    • 64

    Reading Dump

    Hi friends,

    can anyone tell me how can I read dump values from one database to another?
    I can't understand the dump concept properly. can anybody explain it?
    what command we have to use to dump tables?

    I have to dump one large table from one database to another.
    what is the command for it?
    Please help me out.

    Thanx n Regards
    Yas...
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    mysqldump is a tool to import and export MySQL databases.

    It can be used to back up a database or to move database information from one server to another.

    To export a database.

    # mysqldump -u username -ppassword database_name > FILE.sql

    Replace username, password and database_name with your MySQL username, password and database name.

    Import is used to restore data from a backup or to import from another MySQL server.

    Start by uploading the FILE.sql file to the server where you will be running this command.

    # mysql -u username -ppassword database_name < FILE.sql

    Comment

    • ronverdonk
      Recognized Expert Specialist
      • Jul 2006
      • 4259

      #3
      When you can use phpMyAdmin it is even simpler. Just go to the database panel and click 'Export' tab at the top.

      It will prompt you for the names of the tables (or the entire database), and the extra options to generate like 'DROP' and 'IFEXISTS', whether you want to write the sql dump to screen, where you can copy and paste it, or write the dump to a file.

      In the latter case, you can then transmit that file to the new database server and do exactly the opposite, i.e. go to the db panel, hit the 'Import' button, and specify the name of the dump file you made previously and run it.

      Ronald

      Comment

      • yasmine
        New Member
        • Feb 2008
        • 64

        #4
        Thanks a lot.... for ur valuable replies......
        I'm amazing, how easy these things are......


        Thanx n Regards
        Yas...

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          Originally posted by yasmine
          Thanks a lot.... for ur valuable replies......
          I'm amazing, how easy these things are......

          Thanx n Regards
          Yas...
          You are welcome yasmine. See my signature for an explanation of why sometimes things look difficult.

          Ronald

          Comment

          Working...