Skip to content

Instantly share code, notes, and snippets.

@dakait
Last active March 29, 2019 10:56
Show Gist options
  • Save dakait/314f4753d986549677afa0120913e852 to your computer and use it in GitHub Desktop.
Save dakait/314f4753d986549677afa0120913e852 to your computer and use it in GitHub Desktop.
Mysql install/remove
Removing mysql completely
sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
sudo apt-get autoremove -y
sudo apt-get autoclean
rm -rf /etc/mysql
sudo find / -iname 'mysql*' -exec rm -rf {} \;
Installing mysql:
sudo apt install mysql-server mysql-client
sudo mysql_secure_installation
sudo service mysql restart
If there is password problem
sudo mysql -u root
SELECT User, Host, HEX(authentication_string) FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';
SET GLOBAL validate_password_policy=LOW;
exit
sudo service mysql restart
Adding setting in virtualenv for development.
DJANGO_SETTINGS_MODULE="sinewrest.settings-devel"
export DJANGO_SETTINGS_MODULE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment