Mac-MYSQL报错
1.MySql 启动报错:The server quit without updating PID file…
解决方法:清除所有数据,初始化后重新安装(hombrew)
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
mysqld --initialize --explicit_defaults_for_timestamp
mysql.server start # no sudo!
2.java.sql.SQLException: Unknown system variable ‘tx_isolation’
解决方法:使用的是MYSQL8,请尝试show variables like ‘transaction_isolation’。Mysql8已重命名tx_isolation为transaction_isolation更换mysql版本。