I am writting a script to restart mysql at a certain check, but I am unable to run the following from PHP:
exec('/sbin/service mysqld restart');
/sbin/service mysqld restart, when run from SSH succussfully restarts mySQL.
Please help me, if I am doing any mistake and correct me.
Do we have to give any permissions to this file, as presently this file is owned by a user not root.