title: Restart mysql within php browser, permissions issue?
body: <p>I would like to create a button on my website that restarts mysql (I realize this is really bad news). I am using ec2 which has really strict user permissions.</p>
  
  <p>This is my php code, but it's not restarting the session.</p>
  
  <pre><code>&lt;?php
  if(isset($_POST['mysql'])){
      exec("sudo /etc/init.d/mysqld restart");
  }
  ?&gt;
  
  &lt;form method="POST" action=""&gt;
  &lt;input type="submit" value="mysql" name="mysql"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is my suders file ...</p>
  
  <pre><code>Cmnd_Alias RESTART_MYSQL  = /etc/init.d/mysqld restart
  mysql ALL =NOPASSWD: RESTART_MYSQL
  </code></pre>
  
  <p>This doesn't work either...</p>
  
  <pre><code>Cmnd_Alias RESTART_MYSQL  = /etc/init.d/mysqld restart
  apache ALL =NOPASSWD: RESTART_MYSQL
  </code></pre>