I accidentally DROP
a column from a table in a database. I want to restore that column, luckily I have an .sql file of a backup this morning. I use DataGrip.
Is there a way to import only that table from the .sql file? That way I will not have to reset all other tables too (that other people are working on).
What I ended up doing was
mysqladmin -u root -p create temp
mysql -u root -p restore < mydump.sql
mysqldump -u root -p restore mytable > mytable.sql
Import the file in DataGrip, right-click the tab and press 'Run...' and set your database as target.