MySQL does not start with MAMP Pro (5.0.1) - mysql

This is my error log, I cant figure out why mysql wont start with MAMP pro. It starts with MAMP.
2018-08-15T20:00:17.6NZ mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
2018-08-15T20:07:13.6NZ mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'.
2018-08-15T20:07:13.6NZ mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql57
2018-08-15T20:07:13.461794Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2018-08-15T20:07:13.462033Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.21) starting as process 80443 ...
2018-08-15T20:07:13.466069Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql57/ is case insensitive
2018-08-15T20:07:13.468580Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-08-15T20:07:13.468648Z 0 [Note] InnoDB: Uses event mutexes
2018-08-15T20:07:13.468705Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-08-15T20:07:13.468724Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-08-15T20:07:13.468779Z 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
2018-08-15T20:07:13.469152Z 0 [Note] InnoDB: Number of pools: 1
2018-08-15T20:07:13.469343Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-08-15T20:07:13.470836Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-08-15T20:07:13.484818Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-08-15T20:07:13.498079Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2018-08-15T20:07:13.498170Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-08-15T20:07:13.807668Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-08-15T20:07:13.807745Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-08-15T20:07:13.807819Z 0 [ERROR] Failed to initialize builtin plugins.
2018-08-15T20:07:13.807888Z 0 [ERROR] Aborting
2018-08-15T20:07:13.807956Z 0 [Note] Binlog end
2018-08-15T20:07:13.808103Z 0 [Note] Shutting down plugin 'CSV'
2018-08-15T20:07:13.808957Z 0 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete
2018-08-15T20:07:13.6NZ mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
I have no mysql instances running. Any help here will be appreciated. Thanks

Turns out the problem was with my filesystem. That's why MAMP PRO did not work. A friend helped me set up my laptop at the beginning and we chose the Apple File System (APFS) which is case-insensitive. Then I created a partition of the disk and formatted it to have Mac OS Extended (Case-sensitive, Journaled). That's when everything worked.

Related

MAMP not working after Macbook crashes. How do I restore MAMP and my databases?

My Macbook crashed and now MAMP (latest version v6.6.3) is not working anymore.
I was able to log in to MYSQL only over command line with
/Applications/MAMP/bin/startMysql.sh
/Applications/MAMP/bin/startApache.sh
But my databases are gone.
However, I can see in the error log that there is an issue with one of my databases (drupal8). So the database is still somewhere? But why can't I see it?
2022-10-12T02:36:17.6NZ mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'.
2022-10-12T02:36:17.6NZ mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql57
mysqld: [Warning] World-writable config file '/Applications/MAMP/tmp/mysql/my.cnf' is ignored.
2022-10-12T02:36:17.347806Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-10-12T02:36:17.349461Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2022-10-12T02:36:17.350939Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.34) starting as process 62124 ...
2022-10-12T02:36:17.363631Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql57/ is case insensitive
2022-10-12T02:36:17.373326Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-10-12T02:36:17.373353Z 0 [Note] InnoDB: Uses event mutexes
2022-10-12T02:36:17.373365Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2022-10-12T02:36:17.373375Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-10-12T02:36:17.375559Z 0 [Note] InnoDB: Number of pools: 1
2022-10-12T02:36:17.378292Z 0 [Note] InnoDB: Using CPU crc32 instructions
2022-10-12T02:36:17.380118Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2022-10-12T02:36:17.390613Z 0 [Note] InnoDB: Completed initialization of buffer pool
2022-10-12T02:36:17.415180Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2022-10-12T02:36:17.418235Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 73772091416
2022-10-12T02:36:17.418356Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 73772146375
2022-10-12T02:36:17.422286Z 0 [Note] InnoDB: Database was not shutdown normally!
2022-10-12T02:36:17.422329Z 0 [Note] InnoDB: Starting crash recovery.
2022-10-12T02:36:17.467479Z 0 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 0 1 2 3 4 5 6 7 8 2022-10-12T02:36:17.468325Z 0 [ERROR] InnoDB: Trying to access page number 32 in space 580, space name drupal8/cache_menu, which is outside the tablespace bounds. Byte offset 0, len 16384, i/o type read. If you get this error at mysqld startup, please check that your my.cnf matches the ibdata files that you have in the MySQL server.
2022-10-12T02:36:17.468359Z 0 [ERROR] InnoDB: Server exits.
2022-10-12T02:36:17.6NZ mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
When I open PhpMyAdmin I get an error as well:
PHP 5.5+ is required.
Currently installed version is: 5.4.45
But I have PHP set to 7.4.21 in MAMP.

Mgt Development Environment - MySQL suddenly won't start

I have 4 containers using mgt-commerce/mgt-development-environment-7.2. Basically everything runs well until I cannot access the control panel. It returns 500.
After checking the services, logs, etc, it seems like mysql is unable to start. Here is the error log captured in /var/log/mysql/error.log during starting mysql service using sudo service mysql start.
2019-09-26T23:38:43.740283Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2019-09-26T23:38:43.921450Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.26-29) starting as process 1576 ...
2019-09-26T23:38:43.924613Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-09-26T23:38:43.924635Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-09-26T23:38:43.924639Z 0 [Note] InnoDB: Uses event mutexes
2019-09-26T23:38:43.924642Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-09-26T23:38:43.924644Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-09-26T23:38:43.924647Z 0 [Note] InnoDB: Using Linux native AIO
2019-09-26T23:38:43.924859Z 0 [Note] InnoDB: Number of pools: 1
2019-09-26T23:38:43.924920Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-09-26T23:38:43.925849Z 0 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 8, chunk size = 128M
2019-09-26T23:38:43.946744Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-09-26T23:38:43.955252Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-09-26T23:38:43.966654Z 0 [Note] InnoDB: Recovering partial pages from the parallel doublewrite buffer at /var/lib/mysql/xb_doublewrite
2019-09-26T23:38:44.033822Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-09-26T23:38:44.033986Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2019-09-26T23:38:44.034023Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2019-09-26T23:38:44.034040Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-09-26T23:38:45.135220Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-09-26T23:38:45.135270Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-09-26T23:38:45.135283Z 0 [ERROR] Failed to initialize builtin plugins.
2019-09-26T23:38:45.135291Z 0 [ERROR] Aborting
2019-09-26T23:38:45.135301Z 0 [Note] Binlog end
2019-09-26T23:38:45.135371Z 0 [Note] Shutting down plugin 'CSV'
2019-09-26T23:38:45.136207Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
Is there anyone using this image ever getting this kind of error?
Update
It seems like mysql doesn't have the access to a particular file(s) or directory(ies), but I'm not sure which file(s) or directory(ies) . Here is the permission of mysql data directory:
clp#magento2dev:/$ ls -la /var/lib | grep mysql
drwxr-x--- 1 mysql mysql 4096 Sep 26 23:38 mysql
drwxrwx--- 2 mysql mysql 4096 Jul 11 15:24 mysql-files
drwxr-x--- 2 mysql mysql 4096 Jul 11 15:24 mysql-keyring

LINUX MINT mysql

ERROR LINUX MINT MYSQL
Can You explain what happened?
I can't start in xampp
What configuration should I change ?
I already change /var/lib/mysql/ to chmod 777
2019-02-27T16:35:55.748379Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2019-02-27T16:35:55.748447Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2019-02-27T16:35:55.919606Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-27T16:35:55.921605Z 0 [Note] mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 16788 ...
2019-02-27T16:35:55.926137Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-27T16:35:55.926173Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-27T16:35:55.926182Z 0 [Note] InnoDB: Uses event mutexes
2019-02-27T16:35:55.926190Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-27T16:35:55.926198Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-27T16:35:55.926206Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-27T16:35:55.926511Z 0 [Note] InnoDB: Number of pools: 1
2019-02-27T16:35:55.926644Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-27T16:35:55.928888Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-27T16:35:55.945234Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-02-27T16:35:55.948312Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-02-27T16:35:55.958383Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2019-02-27T16:35:55.958517Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2019-02-27T16:35:55.958539Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-02-27T16:35:56.559302Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-02-27T16:35:56.559365Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-02-27T16:35:56.559381Z 0 [ERROR] Failed to initialize builtin plugins.
2019-02-27T16:35:56.559404Z 0 [ERROR] Aborting
2019-02-27T16:35:56.559441Z 0 [Note] Binlog end
2019-02-27T16:35:56.559583Z 0 [Note] Shutting down plugin 'CSV'
2019-02-27T16:35:56.560410Z 0 [Note] mysqld: Shutdown complete
You must check rights on your filesystem :
The innodb_system data file 'ibdata1' must be writable
The folder containing ibdata1 seems to not be writable by mysql user.
I have the same problem and the file ibdata1 is indeed writable -rw-rw--w-.
The full path of this file is at /usr/local/var/mysql/ibdata1.
But it doen't help if I make the file writable by all -- I get the same error.
Stumbled upon an answer by remove *.err and it did it for me! Hope it helps you.

MAMP Pro MySQL Won't Start

I have tried everything from every forum, still no love. Deleted temp files, even a totally clean re-install.
Even created a new user on my Mac.... same issue.
Here's the MySQL log file:
2018-12-15T09:47:47.6NZ mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'.
2018-12-15T09:47:47.6NZ mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql57
2018-12-15T09:47:48.230415Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2018-12-15T09:47:48.232313Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.23) starting as process 3631 ...
2018-12-15T09:47:48.249599Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql57/ is case insensitive
2018-12-15T09:47:48.266106Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-12-15T09:47:48.266181Z 0 [Note] InnoDB: Uses event mutexes
2018-12-15T09:47:48.266203Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-12-15T09:47:48.266221Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-12-15T09:47:48.266277Z 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
2018-12-15T09:47:48.269905Z 0 [Note] InnoDB: Number of pools: 1
2018-12-15T09:47:48.273776Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-12-15T09:47:48.279178Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-12-15T09:47:48.301106Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-12-15T09:47:48.335445Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-12-15T09:47:48.339844Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 72309002 and the end 72308736.
2018-12-15T09:47:48.339913Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-12-15T09:47:48.642547Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-12-15T09:47:48.642595Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-12-15T09:47:48.642616Z 0 [ERROR] Failed to initialize builtin plugins.
2018-12-15T09:47:48.642631Z 0 [ERROR] Aborting
2018-12-15T09:47:48.643113Z 0 [Note] Binlog end
2018-12-15T09:47:48.644288Z 0 [Note] Shutting down plugin 'CSV'
2018-12-15T09:47:48.645917Z 0 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete
2018-12-15T09:47:48.6NZ mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
2018-12-15T09:58:04.6NZ mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'.
2018-12-15T09:58:04.6NZ mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql57
2018-12-15T09:58:05.259005Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2018-12-15T09:58:05.261261Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.23) starting as process 4301 ...
2018-12-15T09:58:05.280531Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql57/ is case insensitive
2018-12-15T09:58:05.298055Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-12-15T09:58:05.298134Z 0 [Note] InnoDB: Uses event mutexes
2018-12-15T09:58:05.298163Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-12-15T09:58:05.298189Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-12-15T09:58:05.298249Z 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
2018-12-15T09:58:05.301851Z 0 [Note] InnoDB: Number of pools: 1
2018-12-15T09:58:05.306424Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-12-15T09:58:05.310212Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-12-15T09:58:05.334016Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-12-15T09:58:05.390575Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-12-15T09:58:05.395800Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 72309002 and the end 72308736.
2018-12-15T09:58:05.395949Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-12-15T09:58:05.706951Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-12-15T09:58:05.707019Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-12-15T09:58:05.707057Z 0 [ERROR] Failed to initialize builtin plugins.
2018-12-15T09:58:05.707106Z 0 [ERROR] Aborting
2018-12-15T09:58:05.707807Z 0 [Note] Binlog end
2018-12-15T09:58:05.709523Z 0 [Note] Shutting down plugin 'CSV'
2018-12-15T09:58:05.711283Z 0 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete
2018-12-15T09:58:05.6NZ mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
sudo killall -9 mysqld
Run the code in terminal and restart MAMP server.

Can no longer run mysql with homebrew

I had mysql running fine on my Mac running High Sierra, 10.13.5. Last night, however, the system rebooted in the middle of the night for some unknown reason and I haven't been able to get things back and running properly since.
When I run brew services start mysql I get:
Successfully startedmysql(label: homebrew.mxcl.mysql)
in response. However, ps aux | grep mysql shows no running server and I cannot log into mysql. If I run, mysql.server start I get:
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/iMac-5K-3.local.pid).
The error file contents are as follows:
2018-06-18T13:51:57.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/iMac-5K-3.local.pid ended
2018-06-18T13:52:07.6NZ mysqld_safe Logging to '/usr/local/var/mysql/iMac-5K-3.local.err'.
2018-06-18T13:52:07.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
2018-06-18T13:52:07.837840Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-06-18T13:52:07.838096Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2018-06-18T13:52:07.838155Z 0 [Note] /usr/local/opt/mysql/bin/mysqld (mysqld 5.7.22) starting as process 8334 ...
2018-06-18T13:52:07.840681Z 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2018-06-18T13:52:07.841958Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-06-18T13:52:07.841975Z 0 [Note] InnoDB: Uses event mutexes
2018-06-18T13:52:07.841983Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-06-18T13:52:07.841990Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-06-18T13:52:07.842257Z 0 [Note] InnoDB: Number of pools: 1
2018-06-18T13:52:07.842356Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-06-18T13:52:07.843494Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-06-18T13:52:07.852043Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-06-18T13:52:07.901671Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-06-18T13:52:07.902006Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 2700829144 and the end 2700828672.
2018-06-18T13:52:07.902049Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-06-18T13:52:08.338717Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-06-18T13:52:08.338812Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-06-18T13:52:08.338823Z 0 [ERROR] Failed to initialize builtin plugins.
2018-06-18T13:52:08.338835Z 0 [ERROR] Aborting
2018-06-18T13:52:08.338849Z 0 [Note] Binlog end
2018-06-18T13:52:08.338929Z 0 [Note] Shutting down plugin 'CSV'
2018-06-18T13:52:08.339077Z 0 [Note] /usr/local/opt/mysql/bin/mysqld: Shutdown complete
2018-06-18T13:52:08.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/iMac-5K-3.local.pid ended
OK, found the solution here.
I didn't bother with step 1 since I don't have a master/slave setup. I just did:
mv /var/lib/mysql/ib_logfile* ~
I can now start mysql successfully.