这个错误。两种方式解决:
两种方式: a、直接使用su - root来切换到root用户,然后使用 service b、使用su root切换到root用户,并同时使用/sbin/service来操作,如/sbin/service mysql restart.