Advertisement
metalx1000

Reinstall Broken MySQL Server

Feb 4th, 2024
1,195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. # If you are having trouble with mysql not starting
  2. # And having issues with removing it and reinstalling it
  3. # try this
  4. # WARNING - THIS WILL ERASE ALL YOUR DATABASES
  5. # BACK THEM UP FIRST
  6.  
  7. # in BASH (zsh will not autocomplete '*' )
  8. sudo systemctl stop mysql
  9. sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
  10. sudo rm -rf /etc/mysql /var/lib/mysql /var/log/mysql
  11. sudo apt autoremove
  12. sudo apt autoclean
  13. sudo aptitude install mysql-server
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement