Created
May 22, 2018 16:19
-
-
Save saade/03a0b6068cdd6a61b59179fc5906aa4f to your computer and use it in GitHub Desktop.
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
| sudo mkdir /var/run/mysqld | |
| sudo chmod 777 /var/run/mysqld | |
| sudo /etc/init.d/mysql stop | |
| sudo mysqld_safe --skip-grant-tables & | |
| mysql -uroot | |
| use mysql; | |
| update user set authentication_string=password('mynewpassword') where user='root'; | |
| flush privileges; | |
| quit | |
| sudo /etc/init.d/mysql start |
Author
Author
mysql -u root -p
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'some_very_complex_password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo /usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf