Last active
May 17, 2018 11:11
-
-
Save tmilos/f98d44662efcad9231cdc32abc8c1b74 to your computer and use it in GitHub Desktop.
Revisions
-
tmilos renamed this gist
May 17, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
tmilos revised this gist
May 17, 2018 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ ```bash # Stop MySQL sudo service mysql stop # Make MySQL service directory. @@ -15,4 +16,5 @@ EXIT; # Turn off MySQL. sudo mysqladmin -S /var/run/mysqld/mysqld.sock shutdown # Start the MySQL service normally. sudo service mysql start ``` -
tmilos created this gist
May 17, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # Stop MySQL sudo service mysql stop # Make MySQL service directory. sudo mkdir /var/run/mysqld # Give MySQL user permission to write to the service directory. sudo chown mysql: /var/run/mysqld # Start MySQL manually, without permission checks or networking. sudo mysqld_safe --skip-grant-tables --skip-networking & # Log in without a password. mysql -uroot mysql UPDATE mysql.user SET authentication_string=PASSWORD('YOURNEWPASSWORD'), plugin='mysql_native_password' WHERE User='root' AND Host='%'; EXIT; # Turn off MySQL. sudo mysqladmin -S /var/run/mysqld/mysqld.sock shutdown # Start the MySQL service normally. sudo service mysql start