Reputation: 2115
I'm trying to do something like this:
$ mysql -e "FLUSH TABLES WITH READ LOCK"
$ ./do-something.sh
$ mysql -e "UNLOCK TABLES"
so-something.sh
script should be unable to write to database.
Is that possible using bash, or I need python or something like that? Problem is that lock is removed when session is lost, can I run 2 commands with same session?
Upvotes: 0
Views: 223