I was trying to change the mysql data directory following these instructions. When I try to restart the database with step 8:

sudo /etc/init.d/mysql restart

Gets the following errror:

Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop mysql ; start mysql. The restart(8) utility is also available.
start: Job failed to start

When I try to start the database with:

service mysql start

I get the following error message:

start: Rejected send message, 1 matched rules; type="method_call", sender=":1.71" (uid=1000 pid=3703 comm="start mysql ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")

after trying sudo mysql start I get Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

  • 1
    The first is not an error, just a friendly tip. The second message may be caused by your not using sudo. What happens if you try sudo service mysql start? – Jos May 5 '14 at 20:25
  • With sudo service mysql start I get start: Job failed to start (I also restarted computer inbetween). When I was originally trying I believe I had root permissions from a prior line. – Michael May 5 '14 at 20:30
  • Look in /var/log/mysql/error.log to see what goes wrong there. – Jos May 5 '14 at 20:32
  • Last entry in the log is from when I shutdown the server before changing the data directory following the instructions in the link above. – Michael May 5 '14 at 20:35
  • Anything in the /var/log/apparmor folder? Something goes wrong before the server even has access to the error log. – Jos May 5 '14 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.