I am trying to set up mysql@5.6 on my mac. I had multiple versions of mysql in my local, I removed all of them, installed mysql@5.6 by following these steps as per this post: After MySQL install via Brew, I get the error - The server quit without updating PID file:
brew remove mysql
brew cleanup
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo rm -rf /usr/local/var/mysql
brew install mysql@5.6
ln -s /usr/local/Cellar/mysql\@5.6/5.6.47/bin/mysql /usr/local/bin/mysql
I did not have any my.cnf
file inside /etc
, so I created this with following content:
[mysqld]
bind-address = 127.0.0.1
Now while doing mysql.server start, getting following error:
... ERROR! The server quit without updating PID file (/usr/local/var/mysql/my.pid).
I checked the log file, I am seeing following error:
2020-04-28 11:17:49 48498 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/opt/mysql@5.6/bin/mysqld: Table 'mysql.plugin' doesn't exist
2020-04-28 11:17:49 48498 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2020-04-28 11:17:49 48498 [Note] InnoDB: Using atomics to ref count buffer pool pages
2020-04-28 11:17:49 48498 [Note] InnoDB: The InnoDB memory heap is disabled
2020-04-28 11:17:49 48498 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-04-28 11:17:49 48498 [Note] InnoDB: Memory barrier is not used
2020-04-28 11:17:49 48498 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-04-28 11:17:49 48498 [Note] InnoDB: Using CPU crc32 instructions
2020-04-28 11:17:49 48498 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2020-04-28 11:17:49 48498 [Note] InnoDB: Completed initialization of buffer pool
2020-04-28 11:17:49 48498 [Note] InnoDB: Highest supported file format is Barracuda.
2020-04-28 11:17:49 48498 [Note] InnoDB: 128 rollback segment(s) are active.
2020-04-28 11:17:49 48498 [Note] InnoDB: Waiting for purge to start
2020-04-28 11:17:49 48498 [Note] InnoDB: 5.6.47 started; log sequence number 1603477
2020-04-28 11:17:49 48498 [ERROR] /usr/local/opt/mysql@5.6/bin/mysqld: unknown variable 'mysqlx-bind-address=127.0.0.1'
2020-04-28 11:17:49 48498 [ERROR] Aborting
Then I followed this post: Can't open the mysql.plugin table. Please run mysql_upgrade to create it, and run following command:
/usr/local/Cellar/mysql\@5.6/5.6.47/bin/mysqld --initialize-insecure
But still I am seeing the same error.
EDIT:
I have found my.cnf file, it was located inside /usr/local/etc/
I removed mysqlx-bind-address, now I am getting following errors:
2020-04-28 14:16:13 97501 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2020-04-28 14:16:35 98713 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.