Answer the question
In order to leave comments, you need to log in
Database structure dump + data from one table?
Good afternoon, tell me how you can export the database structure + data from one specific table.
The problem is the following, there is a yii migration table that stores which migration was applied, and I want to save this data so that when transferring to a new server, execute sql and not perform the migration again.
Answer the question
In order to leave comments, you need to log in
mysqldump -u USER -p DATABASE TABLENAME > dump.sql
USER, DATABASE and TABLENAME replace with the ones you need
You can use Sypex Dumper .
There, select the desired database, in the list of objects, click on the Tables checkbox, the black square in the checkbox means that only the structure will be copied, and then make a couple of clicks on the checkbox of the desired table that needs to be backed up completely. Then click Run. For example, in the screenshot of all tables, only the structure is dumped, and jl_associations is completely dumped.
If, when restoring a table with data, you do not want to delete the table and create it again. You can use the recovery strategies INSERT IGNORE (so that only new data is added to the table), or REPLACE (so that the data from the dump replaces the data in the database).
If you need to do such a dump regularly, then click Save, after which the task can be performed from the Export drop-down menu. Or by crown.
dump script of the database structure and all tables
https://4admin.info/dump-tables-mysql/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question