Enter the MySQL directory input command line
# LessLocalhost.localdomain.err
160703 -:xx: AMysqld_safe starting mysqld daemon with databases from/usr/local/var/MySQL .- --03T12:xx: A.397109Z0[Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for Moredetails). .- --03T12:xx: A.398333Z0[Warning] Insecure Configuration for--secure-file-priv:current value does not restrict the location of generated files. Consider setting it to a valid, non-empty path. .- --03T12:xx: A.398884Z0[Note]/usr/local/cellar/mysql/5.7.Ten/bin/mysqld (mysqld5.7.Ten) Starting as Process837 ... .- --03T12:xx: A.406560Z0[Warning] Setting lower_case_table_names=2BecausefileSystem for/usr/local/var/mysql/is Caseinsensitive .- --03T12:xx: A.413518Z0[Note] innodb:mutexes and rw_locks use GCC atomic builtins .- --03T12:xx: A.413545Z0[Note] innodb:uses event mutexes .- --03T12:xx: A.413550Z0[Note] INNODB:GCC Builtin __atomic_thread_fence () is used forMemory Barrier .- --03T12:xx: A.413556Z0[Note] innodb:compressed Tables Use Zlib1.2.3 .- --03T12:xx: A.414298Z0[Note] Innodb:number of Pools:1 .- --03T12:xx: A.415508Z0[Note] innodb:using CPU CRC32 Instructions .- --03T12:xx: A.424979Z0[Note] Innodb:initializing buffer pool, total size = 128M, instances =1, Chunk size =128M .- --03T12:xx: A.437917Z0[Note] innodb:completed initialization of buffer pool .- --03T12:xx: A.451096Z0[ERROR] Innodb:the Innodb_system Datafile 'ibdata1'must be writable .- --03T12:xx: A.451136Z0[ERROR] Innodb:the Innodb_system Datafile 'ibdata1'must be writable .- --03T12:xx: A.451189Z0[ERROR] Innodb:plugin initialization aborted with error Generic error .- --03T12:xx: A.754267Z0[ERROR] Plugin'InnoDB'Initfunctionreturned error. .- --03T12:xx: A.754344Z0[ERROR] Plugin'InnoDB'registration as a STORAGE ENGINE failed. .- --03T12:xx: A.754370Z0[ERROR] Failed to initialize plugins. .- --03T12:xx: A.754377Z0[ERROR] aborting .- --03T12:xx: A.754396Z0[Note] Binlog End .- --03T12:xx: A.756029Z0[Note] Shutting down plugin'CSV' .- --03T12:xx: A.756511Z0[Note]/usr/local/cellar/mysql/5.7.Ten/bin/Mysqld:shutdown Complete160703 -:xx: AMysqld_safe mysqld from PIDfile/usr/local/var/mysql/huangjicaidemacbook-pro.local.pid Ended
Workaround:
Delete MySQL directory: ibdata1 ib_logfile0 ib_logfile1 These 3 files, restart MySQL
Start MySQL times Error: Starting mysql.the server quit without updating PID file (/var/lib/mysql/tserver.pid). [FAILED]