apache訪問日誌access.log的解析以及如何將其匯入mysql

來源:互聯網
上載者:User


>> apache_log.txt

Records: 2000  Deleted: 0  Skipped: 0  Warnings: 2672

1)如果你的filename為絕對路徑,則伺服器從根目錄開始尋找該檔案.
2)如果你的filename為相對路徑,則伺服器從資料庫的資料目錄中開始尋找該檔案.
如果你給出了local,則檔案將按以下方式進行定位:
1)如果你的filename為絕對路徑,則客戶機從根目錄開始尋找該檔案.
2)如果你的filename為相對路徑,則客戶機從目前的目錄開始尋找該檔案.

+--------------+-----------+------+-----+---------+----------------+
| Field        | Type      | Null | Key | Default | Extra          |
+--------------+-----------+------+-----+---------+----------------+
| id           | int(11)   | NO   | PRI | NULL    | auto_increment |
| hostip       | char(32)  | NO   |     | 0.0.0.0 |                |
| marking      | char(30)  | YES  |     | NULL    |                |
| browser_name | char(30)  | YES  |     | NULL    |                |
| addtime      | char(64)  | NO   |     | NULL    |                |
| time_zone    | char(8)   | NO   |     | NULL    |                |
| method       | char(8)   | NO   |     | NULL    |                |
| resource     | char(64)  | NO   |     | NULL    |                |
| protocol     | char(8)   | YES  |     | NULL    |                |
| status       | int(5)    | YES  |     | NULL    |                |
| bytes        | int(5)    | YES  |     | NULL    |                |
| refer        | char(128) | YES  |     | NULL    |                |
| client_info  | char(128) | YES  |     | NULL    |                |
+--------------+-----------+------+-----+---------+----------------+
13 rows in set (0.00 sec)

+----+-----------------+---------+--------------+-----------------------+-----------+--------+--------------------------------------------+----------+--------+-------+-------+------------------------------------------------------------------------------------+
| id | hostip          | marking | browser_name | addtime               | time_zone | method | resource                                   | protocol | status | bytes | refer | client_info                                                                        |
+----+-----------------+---------+--------------+-----------------------+-----------+--------+--------------------------------------------+----------+--------+-------+-------+------------------------------------------------------------------------------------+
|  1 | 220.181.108.116 | -       | -            | [21/Aug/2013:23:59:59 | +0800]    | "GET   | /search/prj/tag/2089-2124-2350-2354-1.html | HTTP/1.1 |    200 |  8181 | "-"   | "Mozilla/5.0(compatible;Baiduspider/2.0;+http://www.baidu.com/search/spider.html)" |
|  2 | 220.181.165.5   | -       | -            | [21/Aug/2013:23:59:59 | +0800]    | "GET   | /event/bushanping/admin_login.php          | HTTP/1.1 |    200 | 32095 | "-"   | "Mozilla/5.0(Windows;U;WindowsNT5.1;zh-CN;rv:1.9.1.1)Gecko/20090715Firefox/3.5.1"  |
|  3 | 220.181.165.136 | -       | -            | [21/Aug/2013:23:59:59 | +0800]    | "GET   | /search/diy/server-status/                 | HTTP/1.1 |    404 | 21795 | "-"   | "Mozilla/5.0(Windows;U;WindowsNT5.1;zh-CN;rv:1.9.1.1)Gecko/20090715Firefox/3.5.1"  |
+----+-----------------+---------+--------------+-----------------------+-----------+--------+--------------------------------------------+----------+--------+-------+-------+------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)

匯入成功


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.