Ambari will overwrite the changes made to the xml files directly.
Any changes must be made in Ambari itself or you must use /var/lib/ambari-server/resources/scripts/configs.sh
This enables a simpler way to use the Ambari API to change configurations.
If you run
“configs.sh get 127.0.0.1 CLUSTERNAME oozie-site”
This will give you all the configurations which you can change, then you can find what you want to modify to MySQL and update them accordingly.