Install mysql
bash
1brew install [email protected]Link mysql
brew link [email protected] --force
Start mysql service
bash
1brew services start [email protected]Prevent upgrade from Brew
bash
1brew pin [email protected]Check logs
bash
1tail -30 /opt/homebrew/var/mysql/*.erris MySQL running?
bash
1ps aux | grep mysqld | grep -v grepif downfraded from 9 clear mysql database folder
bash
1rm -rf /opt/homebrew/var/mysqlmy.cnf path
bash
1nano /opt/homebrew/etc/my.cnfCreate user for remote access
sql
1CREATE USER 'admin'@'%' IDENTIFIED BY 'strong_password';2GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;3FLUSH PRIVILEGES;Mysql logs
bash
1ls /usr/local/var/mysql/*.err