Skip to content

Instantly share code, notes, and snippets.

@ttj4
Created January 23, 2019 10:31
Show Gist options
  • Save ttj4/f85d04a0dad84f141e3b6ebef88626d3 to your computer and use it in GitHub Desktop.
Save ttj4/f85d04a0dad84f141e3b6ebef88626d3 to your computer and use it in GitHub Desktop.
sudo apt-get install mysql-server-5.7
sudo service mysql stop
sudo mkdir -p /var/run/mysqld
sudo chown mysql:mysql /var/run/mysqld
sudo mysqld_safe --skip-grant-tables --skip-syslog --skip-networking
open new terminal and enter : mysql -uroot
use mysql;
update user set authentication_string=PASSWORD("") where User='root';
update user set plugin="mysql_native_password" where User='root'; # THIS LINE
flush privileges;
quit;
if any issue while installing (re installing)
sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-5.7 mysql-client-core-5.7
sudo rm -rfv /etc/mysql /var/lib/mysql
sudo apt autoremove
sudo apt autoclean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment