Programming in mysql: Restart mysql with in php browser, permissions issue? on newest questions tagged mysql – Stack Overflow
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.
This is my php code, but it’s not restarting the session.
<?php
if(isset($_POST['mysql'])){
exec("sudo /etc/init.d/mysqld restart");
}
?>
<form method="POST" action="">
<input type="submit" value="mysql" name="mysql">
</form>
This is my suders file …
Cmnd_Alias RESTART_MYSQL = /etc/init.d/mysqld restart
mysql ALL =NOPASSWD: RESTART_MYSQL
See Answers
source: http://stackoverflow.com/questions/10588636/restart-mysql-with-in-php-browser-permissions-issue
Programming in mysql: programming-in-mysql
Recent Comments