Set particular database temporarily to read-only through the command line while connecting db ?
Note : Want to prevent UPDATE/DELETE operations
Like - < --i-am-a-dummy >, it prevents to update/delete a table without a WHERE clause, But I dont want update/delete with/without WHERE.
Yes, I can create user, however, is it possible at connection time ?
This would set it permanently, and I don't want it permanently.
/bin/mysql -uroot -ppass --execute="GRANT SELECT ON 'maindb'@.* TO 'root'@'localhost';FLUSH PRIVILEGES;"