is there some way to do this sql script, in mysql?
You should only change create and grant statements, everything else is ok.
CREATE USER example_work_srv IDENTIFIED BY 'P4ssw0rd.';
GRANT SELECT, INSERT, UPDATE ON public.* TO example_work_srv;