Created
July 11, 2016 13:08
-
-
Save petrleocompel/542957c46437181abf8e70fb7cb92913 to your computer and use it in GitHub Desktop.
Mysql - reinstall (with db remove) + no root pass
This file contains 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
apt-get remove mysql-server mysql-client mysql-server-core* mysql-client-* | |
rm -rf /var/lib/mysql /etc/mysql | |
update-alternatives --remove my.cnf /etc/mysql/my.cnf.fallback | |
update-alternatives --remove my.cnf /etc/mysql/my.cnf | |
update-alternatives --remove my.cnf /etc/mysql/mysql.cnf | |
apt-get install mysql-server mysql-client mysql-server-core* mysql-client-* | |
dpkg --force-confmiss --install /var/cache/apt/archives/mysql-* |
This file contains 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
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root'; | |
SET PASSWORD FOR 'root'@'localhost' = ''; | |
FLUSH PRIVILEGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment