Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 22536  / 3 Years ago, sun, july 11, 2021, 6:52:16

I need to run in background mode some mysql-query...
But how can i do this with nohup?


Standardly i do:


mysql -uroot -p
use SomeDb;
Select * from blablalba;

But how can i do this with launching in db process?
i do mysql importing with nohup, but how with query?


More From » mysql

 Answers
2
mysql -u [username] -p [database_name] -e "[sql_query]"


Example:



nohup mysql -u root -p somedb -e "select * from mytable" &

[#32570] Sunday, July 11, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
admin

Total Points: 459
Total Questions: 112
Total Answers: 109

Location: Equatorial Guinea
Member since Sun, Feb 14, 2021
3 Years ago
;