Skip to content

Instantly share code, notes, and snippets.

@caarmen
Last active May 20, 2022 15:12
Show Gist options
  • Save caarmen/d09feacfa52092b6371b6c0900449efb to your computer and use it in GitHub Desktop.
Save caarmen/d09feacfa52092b6371b6c0900449efb to your computer and use it in GitHub Desktop.
reinstall mariadb/mysql on mac
Remove contents of /usr/local/var/mysql
brew uninstall mysql
brew uninstall mariadb
brew install mariadb
mysql_install_db
mysql.server start
sudo mysql
- this opens a session. Just exit mysql for now
mysql_secure_installation
- Answer yes to everything
sudo mysql
create a new user:
CREATE USER 'jdoe'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'jdoe'@'localhost';
FLUSH PRIVILEGES;
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment