Run MySQL command in background on Linux

Posted on March 28, 2018 at 11:53 am

Run a MySQL command in background from SSH command-line on Linux:

nohup mysql -h localhost -u username -p'password' databasename -e "ALTER TABLE users DROP COLUMN email;" >/dev/null 2>&1 &

In the above command-line we run this MySQL command:

ALTER TABLE users DROP COLUMN email;

It is just an example of course.

Other Posts

Updated Posts