mysqldump exports only one table

前端 未结 4 1748
清酒与你
清酒与你 2021-01-29 23:58

I was using mysqldump to export the database, like this:

mysqldump -u root -ppassword my_database > c:\\temp\\my_database.sql

Somehow, it on

4条回答
  •  无人共我
    2021-01-30 00:32

    Quoting this link: http://steveswanson.wordpress.com/2009/04/21/exporting-and-importing-an-individual-mysql-table/

    • Exporting the Table

    To export the table run the following command from the command line:

    mysqldump -p --user=username dbname tableName > tableName.sql
    

    This will export the tableName to the file tableName.sql.

    • Importing the Table

    To import the table run the following command from the command line:

    mysql -u username -p -D dbname < tableName.sql
    

    The path to the tableName.sql needs to be prepended with the absolute path to that file. At this point the table will be imported into the DB.

提交回复
热议问题