Home > database >  Mysqldump, how to backup database backup all a few tables, a table according to the conditions of th
Mysqldump, how to backup database backup all a few tables, a table according to the conditions of th

Time:09-27

Now only can backup all, or according to the condition of separate backup a table

Sbcommand. AppendFormat (" mysqldump - quick - host="+ serviceIP +" - the default - character - set=GBK - lock - tables -- verbose -- force - port=3306 - user="+ UserId +" -- "=" + pass + "data - r " {0} \ "", the directory).

Sbcommand. AppendFormat (" mysqldump - quick - host="+ serviceIP +" - the default - character - set=GBK - lock - tables -- verbose -- force - port=3306 - user="+ UserId +" -- "=" + pass + "data person - where=id='5833' - master-data=https://bbs.csdn.net/topics/1 -r/" {0} " ", the directory).


CodePudding user response:

Export a single data table structure
Mysqldump -h localhost - uroot - proot - d database table & gt; SQL
table.
Export a single data table structure and data
The mysqldump - h localhost - uroot - proot database table & gt; SQL
table.According to the condition derived
The mysqldump uroot - proot database table - where="" - & gt; Table. The SQL

CodePudding user response:

reference 1st floor a20FB451FD response:
export a single data table structure
Mysqldump -h localhost - uroot - proot - d database table & gt; SQL
table.
Export a single data table structure and data
The mysqldump - h localhost - uroot - proot database table & gt; SQL
table.According to the condition derived
The mysqldump uroot - proot database table - where="" - & gt; Table. SQL

This I know, the problem is that I think I would like to export A list of all the data, for example, and want to export the table B part of the data, then the two tables of data in the same. The SQL
  • Related