You shouldn't have any reason to change the MySQL root passwd.
Do a search for MySQL root password and you will see this has been covered many many times.
Any application which needs access to MySQL should have its own DB & User(s), with privileges set for that particular application.
Running an application as root is asking for trouble.
Dave