Getting an error like this when trying to start your mysql server?

danielle at edm-mac-771 in /var$ mysql.server start
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/***.pid).

These are the steps I took to get mysql up and running again:

  1. run mysqld in your shell prompt
  2. check the error message
  3. for me I needed to delete my ibd files: rm ib_logfile0 ib_logfile1 ibdata1
  4. kill any mysql and mysqld processes running: ps aux then CMD + F "mysql(d)") then kill <process_id>
  5. mysql.server start

TL;DR

I had problems starting mysql on my machine so I uninstalled mysql 5.7 on my machine and installed 5.6 using homebrew.

I installed 5.6 because that is the version of mysql my company uses for production.

However, trying to start the mysql server returned the below error.

danielle at edm-mac-771 in /var$ mysql.server start
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/edm-mac-771.edmodo.lan.pid).

Finally I tried msyqld to run mysql in the foreground.

danielle at edm-mac-771 in /var$ mysqld
2016-01-26 13:32:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-01-26 13:32:33 0 [Note] mysqld (mysqld 5.6.27) starting as process 24553 ...
2016-01-26 13:32:33 24553 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2016-01-26 13:32:33 24553 [Note] Plugin 'FEDERATED' is disabled.
2016-01-26 13:32:33 24553 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-01-26 13:32:33 24553 [Note] InnoDB: The InnoDB memory heap is disabled
2016-01-26 13:32:33 24553 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-01-26 13:32:33 24553 [Note] InnoDB: Memory barrier is not used
2016-01-26 13:32:33 24553 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-01-26 13:32:33 24553 [Note] InnoDB: Using CPU crc32 instructions
2016-01-26 13:32:33 24553 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-01-26 13:32:33 24553 [Note] InnoDB: Completed initialization of buffer pool
2016-01-26 13:32:33 24553 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
2016-01-26 13:32:33 24553 [ERROR] Plugin 'InnoDB' init function returned error.
2016-01-26 13:32:33 24553 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-01-26 13:32:33 24553 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-01-26 13:32:33 24553 [ERROR] Aborting

2016-01-26 13:32:33 24553 [Note] Binlog end
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'partition'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_METRICS'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_CMPMEM'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_CMP'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_LOCKS'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'INNODB_TRX'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'BLACKHOLE'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'ARCHIVE'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'MRG_MYISAM'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'MyISAM'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'MEMORY'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'CSV'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'sha256_password'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'mysql_old_password'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'mysql_native_password'
2016-01-26 13:32:33 24553 [Note] Shutting down plugin 'binlog'
2016-01-26 13:32:33 24553 [Note] mysqld: Shutdown complete

As you can see, mysqld threw up on me, but was far more helpful than the PID error above. I visited http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html as suggested in the error message and saw that i should delete any ibd files I have.

  1. cd /usr/local/var/mysql
  2. ls -la to make sure your current user has the right permissions for the directory
  3. rm ib_logfile0 ib_logfile1 ibdata1
  4. Make sure that you kill mysql and mysqld processes that may be running before trying to start the server again: ps aux, then CMD + F "mysql(d)", and finally kill <process_id>, <process_id>
  5. mysql.server start

    danielle at edm-mac-771 in ~$ mysql.server start
    Starting MySQL
    . SUCCESS!
    
Tags: