How to update values in production table with foreign keys? I have a prod MySQL table on 5.7.32 where I want to update the values. It coutains only 4K rows. However there is another table with a foreign key to the table I want to update and this one holds millions of rows.
table a
ID | DIMENSION | VALUE

table b
ID | A_ID | ..
Key: A_ID -&gt; a.ID cascade

Now how do I update table a? I fear to cascade to table b in case I do a truncate before import. The new table values are on a development DBMS where initially thought to do a single export and then import with prior truncate.
The updated table holds additional rows, has removed rows and edited rows.
What would be the recommended way to update the data?
Could I simply use the following settings during export with PhpMyAdmin 4.5.7 and then import on prod?
If  you don't change the a ID simply do a
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE TABLE [database_name.]table_name;
INSERT INTO new Values
SET FOREIGN_KEY_CHECKS=1;

If you want to change the a ID
First do your updates, so that you have all changes and then disable the foreing keys