0

I am currently on Ubuntu 22.04. I have over 30 SQL files that creates new databases and some of them are over 10 GB. I don't want to import those files into MySQL using MySQL < File.sql, because using this method I will have to create the databases manually first.

With the Source File.sql command the databases will be created from the query. But, I am connected on the server using a VPN, and my network is kinda messed up at the moment.

How do I run this command and throw it to the background? I know how to send a app to the background using nohup, but I do not know how to send a MySQL query to the background using nohup.

1 Answer 1

0

You can use the command screen which allows you to launch a command in a detached session.

  1. Install screen with the command:

    sudo apt install screen
    
  2. Launch your command in a detached screen:

    screen -dmS "screenNameHere" your command here
    
  3. In order to see your commands progress or result, you can reattach that session with the command:

    screen -r screenNameHere
    

More info on the screen command here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .