重新启动mysql

我尝试在Ubuntu 12.04上重新启动mysql服务器:

viggy@ubuntu:/$ /etc/init.d/mysql restart Rather than invoking init scripts through /etc/init.d, use the service(8) utility, eg 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") 

我不确定那个消息是什么意思。

您需要成为root或使用

 sudo service mysql restart 

以root身份发送重启命令。

mysql是客户端。 您可能希望service mysqld restart 。 除非你以root身份运行,否则你可能还想把sudo添加到命令中。