migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
17
db-security-sec300/week4.md
Normal file
17
db-security-sec300/week4.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Week4
|
||||
Log analysis
|
||||
|
||||
- `sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf`
|
||||
|
||||

|
||||
|
||||
|
||||
- Display failed connect logs, display only date, time, and user
|
||||
```
|
||||
cat /var/log/mysql/query.log | awk -F"[[:space:]T]+" '/Access denied/ {print $1,$2,$9}'
|
||||
```
|
||||
|
||||
- Display successful connect logs, display only date, time, and user
|
||||
```
|
||||
cat /var/log/mysql/query.log | awk -F"[[:space:]T]+" '/Connect/ {print $1,$2,$5}' | grep -v 'Access'
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue