Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trevorgreenleaf/2f4092b721471307e7bb9c680559c04b to your computer and use it in GitHub Desktop.
Save trevorgreenleaf/2f4092b721471307e7bb9c680559c04b to your computer and use it in GitHub Desktop.
Laravel Valet Uninstall and then Reinstall everytime I switch user accounts
## Uninstall process
#remove valet
rm -rf ~/.valet
rm ~/usr/local/bin/valet
# change the permisions on all brew files
sudo chown -R $(whoami) $(brew --prefix)/*
# now uninstall all brew packages
brew uninstall dnsmasq && brew uninstall nginx && brew uninstall php
# clean up - removes logs and cached
brew cleanup
## Install Process
brew tap
brew update
brew install homebrew/core/php
composer global require laravel/valet
valet install
@trevorgreenleaf
Copy link
Author

If you have recently deleted a user account that was using valet make sure to check this file to see that you only have one user setup and its matches up with the current username on your computer

cat /usr/local/etc/dnsmasq.conf

@MichaelBrauner
Copy link

Hm, I did this with a bash script. Now I can not access my mysql anymore -.-.
And when I want to login with mysql -u root -p I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

@trevorgreenleaf
Copy link
Author

Hm, I did this with a bash script. Now I can not access my mysql anymore -.-.
And when I want to login with mysql -u root -p I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Hm, I did this with a bash script. Now I can not access my mysql anymore -.-.
And when I want to login with mysql -u root -p I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

You may need to reinstall MySQL or start MySQL

@tonypartridge
Copy link

Perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment