I try to restart mysql server on Ubuntu 12.04:
viggy@ubuntu:/$ /etc/init.d/mysql restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart
viggy@ubuntu:/$ service mysql restart
stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.83" (uid=1000 pid=4395 comm="stop mysql ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
I'm not sure what that message is saying.
You need to be root or use
in order to send the restart command as root.
. And unless you're running as root, you'll probably want to addmysql
is the client. You probably wantservice mysqld restart
sudo
to the command as well.