Project

General

Profile

Common Problems » History » Version 7

Jessie Lee, 11/10/2017 04:00 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 7 Jessie Lee
* start mysql on command line with @ mysqld_safe --skip-grant-tables@ 
14 2 Jessie Lee
* go into mysql console 
15
* type FLUSH PRIVILEGES; 
16
* SET PASSWORD FOR root@'localhost' = PASSWORD('password');
17 3 Jessie Lee
18 6 Jessie Lee
h3. Reset method 2 
19 1 Jessie Lee
20 6 Jessie Lee
* create file containing the following: 
21
<pre>UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
22
FLUSH PRIVILEGES;</pre>
23
* start mysql with mysqld_safe --init-file=/path/to/file &
24 2 Jessie Lee
* it should be reset!
25
26 1 Jessie Lee
h2. fail2ban locked me out
Go to top