Will a mysql db import be interrupted if my ssh session times out? I have a large-ish (several GB) mysql DB that I'm planning to import via

mysql -u root -p mydb &lt; mydb.sql


in a SSH session.

What would happen if my SSH connection drops?

Is it safer to run something like

nohup mysql -u root -p mydb &lt; mydb.sql


Or does mysql not care? 

Using the following


MySQL 5.1.45   
CentOS 5.x
If the SSH drops without putting the mysql session into the background (along with nohup), then the DB connection is at the SSH session's mercy. So, yes, mysql would care about the lifecycle of the SSH session.

You should launch it with &amp; at the end as follows:

nohup mysql -u root -p mydb &lt; mydb.sql &amp;


Then, you can walk away feeling OK (you could actually logout on purpose at this point) because process 1 (init) will pick up the process ID that is running the mysql session upon the SSH session termination (voluntary or involuntary) because it was suddenly orphaned (What a great dad !!!).