Skip to content

Instantly share code, notes, and snippets.

@hosamshahin
Last active September 14, 2016 21:52
Show Gist options
  • Save hosamshahin/7eaa796f1b3945166a11d76f2f5279cb to your computer and use it in GitHub Desktop.
Save hosamshahin/7eaa796f1b3945166a11d76f2f5279cb to your computer and use it in GitHub Desktop.
-- Reinstall
First remove MySQL:
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
Then reinstall:
sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_install_db
sudo /usr/bin/mysql_secure_installation
-- Basic commands
service mysqld start
service mysqld stop
service mysqld restart
sudo /etc/init.d/mysql start
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment