Home > database >  A backup requirement, the trouble you pay attention to the
A backup requirement, the trouble you pay attention to the

Time:09-22

Request to do the whole database backup, the insert statement is derived in the form of the library, such as: insert into library name. The name of the table values... Existing mysqldump parameters can only support with the field name form, do not know how to implement thank you have a idea

CodePudding user response:

Before you perform insert into execution
USE the database name;
Should specify the database, do not need one table to add the database name,

CodePudding user response:

reference 1st floor AHUA1001 response:
before you perform insert into execution
USE the database name;
It should be able to specify the database, do not need to each table to add the database name,

Thank you for your reply you said I know, because the business to the backup file scanning requirements, need to extract the entire line insert, and insert must take the library

CodePudding user response:

After the backup, use the shell processing, combined with the library

CodePudding user response:

There are two way,
First is more complex, write a SQL statement, response is generated SQL backup, backup, but this one is likely to be in accordance with the logic to handle specific content, such as the content of the empty,
Second is relatively simple, you make backup file using the text tool open, replace the can, put the "INSERT INTO" replace "INSERT INTO the library."

CodePudding user response:

reference 4 floor AHUA1001 response:
there are two way,
First is more complex, write a SQL statement, response is generated SQL backup, backup, but this one is likely to be in accordance with the logic to handle specific content, such as the content of the empty,
Second is relatively simple, you make backup file using the text tool open, replace the can, put the "INSERT INTO" replace "INSERT INTO the library."


If the library can rarely, but business library with thousands of,, ha ha
  • Related