Last active
June 7, 2021 14:13
-
-
Save Tjitse-E/3354136ab2fd33886d202ab6cbcc1957 to your computer and use it in GitHub Desktop.
Mysql 8 update via brew (Magento 2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update all dependencies via brew | |
brew update | |
brew upgrade | |
# validate php | |
php -v | |
# When problems re-occur fix them first. I had to run 'brew reinstall icu4c' because my icu4c dependency was missing. | |
# Remove mysql 5.7 | |
brew services stop [email protected] | |
brew remove [email protected] | |
mv /usr/local/var/mysql /usr/local/var/mysql.backup | |
mv /usr/local/etc/my.cnf /usr/local/etc/my.cnf.backup | |
# Install mysql 8 | |
brew install mysql | |
# Verify mysql 8 installation | |
mysql -V # Should return v8 | |
netstat -ln | grep mysql # There should be a mysql socket running | |
mysql | |
# Set password 'root' | |
mysql_secure_installation | |
# Check mysql access | |
mysql -uroot proot | |
# Try creating a db for a project using magerun2 | |
n98-magerun2 db:create | |
# Resulted in an error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client | |
# To fix this checkout https://magento.stackexchange.com/a/318612/28803 | |
# Now retry creating the db. | |
n98-magerun2 db:import --compression="gzip" your_db.sql.gz | |
n98-mnagerun2 setup:upgrade | |
# Validate the frontend | |
# Fix 'mysql' command on command line | |
nano /usr/local/etc/my.cnf | |
# Add: | |
# | |
# [client] | |
# user=root | |
# password=root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment