Skip to content

Commit 2156cc3

Browse files
authored
Update readme.md
1 parent 74c4e35 commit 2156cc3

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

readme.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
1-
Gud
1+
# Apache Access Log Parser to MySQL
2+
3+
This Python script parses Apache access logs and inserts the log entries into a specified MySQL database table. It handles batch inserts for efficiency and supports datetime conversion to the MySQL `DATETIME` format.
4+
5+
## Requirements
6+
7+
- Python 3.x
8+
- `mysql-connector-python` library
9+
10+
## Installation
11+
12+
1. Clone the repository:
13+
```sh
14+
git clone https://github.com/rifaldi34/apache-to-mysql-log-parser.git
15+
cd apache-log-parser
16+
```
17+
18+
2. Install the required Python library:
19+
```sh
20+
pip install mysql-connector-python
21+
```
22+
23+
## Usage
24+
25+
```sh
26+
python insert_logs.py <access_log_file> <mysql_host> <mysql_user> <mysql_password> <db_name> <table_name>

0 commit comments

Comments
 (0)