0

I ran into this problem twice while running a MySQL server. First of all, when trying to connect to MySQL I was getting the following error:

OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")

When trying to start/stop/restart mysql.server I would get:

ERROR! The server quit without updating PID file

Now in the error logs I could see that it was failing on a InnoDB checksum, i.e. the following error:

InnoDB: Log block has valid header, but checksum field contains X, should be Z

(where X and Z) are some checksum numbers.

Finally I found a solution, see below:

mmagician
  • 1,970
  • 2
  • 15
  • 26

1 Answers1

0

Solution was to disable the log checksum altogether in the config file.

  1. Locate your my.cnf file (If you're on OS X, you might need to create it first, good place is to put it in /etc/my.cnf
  2. Modify your mysqld section to have the following:

    [mysqld]

    ...

    innodb_log_checksums = 0

    ...

  1. Restart: mysql.server restart
  2. If you are still getting the PID error, you need to make sure that you have correct permissions on the .pid file (more info here)

Note: This solution was found there:

https://bugs.mysql.com/bug.php?id=85307 (thanks to zhai weixiang)

mmagician
  • 1,970
  • 2
  • 15
  • 26