Reputation: 3030
mysqld_safe --user=mysql &
was used to startup mysql. I want to know how does shell script receive parameter like --user=mysql
.
And what does &
signal mean here?
Upvotes: 0
Views: 378
Reputation: 289775
&
means that the process will be working on background.
From man bash
:
If a command is terminated by the control operator &, the shell executes the command in the background in a subshell. The shell does not wait for the command to finish, and the return status is 0.
In practice, it means that you can launch the mysqld_safe --user=mysql
command and keep working on that terminal.
$ sleep 5
### 5 seconds
$
$ sleep 5 &
[1] 4009
$ jobs ### shows current background processes
[1]+ Running sleep 5 &
$
[1]+ Done sleep 5
$
Upvotes: 1