Common Problems » History » Version 5
Jessie Lee, 11/10/2017 03:56 PM
1 | 1 | Jessie Lee | h1. Common Problems |
---|---|---|---|
2 | |||
3 | {{lastupdated_at}} by {{lastupdated_by}} |
||
4 | |||
5 | {{>toc}} |
||
6 | |||
7 | |||
8 | h2. Lost Mysql root password |
||
9 | |||
10 | 2 | Jessie Lee | h3. Reset method 1 |
11 | 3 | Jessie Lee | |
12 | 2 | Jessie Lee | * stop mysql |
13 | * start mysql on command line with @ mysqld --skip-grant-tables@ |
||
14 | * go into mysql console |
||
15 | * type FLUSH PRIVILEGES; |
||
16 | * SET PASSWORD FOR root@'localhost' = PASSWORD('password'); |
||
17 | 3 | Jessie Lee | |
18 | 5 | Jessie Lee | h3. Reset method 2 (Use method 1 first, may not work on Debian!) |
19 | 3 | Jessie Lee | |
20 | 2 | Jessie Lee | * create file containing line @SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');@ with the new password replacing MYNewPass |
21 | * start mysql with mysqld --init-file=/path/to/file & |
||
22 | * it should be reset! |
||
23 | |||
24 | 1 | Jessie Lee | h2. fail2ban locked me out |