Last active
March 29, 2019 10:56
-
-
Save dakait/314f4753d986549677afa0120913e852 to your computer and use it in GitHub Desktop.
Mysql install/remove
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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