Go Back   Web Server Hosting Forum by BODHost > Support > MySQL Issues.
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 04-26-07, 11:02
BOD Member
 
Join Date: Nov 2005
Posts: 64
Send a message via AIM to VPS@Support Send a message via MSN to VPS@Support Send a message via Skype™ to VPS@Support
Default How to MySQL with Apache?

By inserting the following in the configuration file of <a href="http://www.bodhost.com/ " target="_blank" title=" Apache" style="color:#000000;text-decoration:none;">Apache </a>, MySQl can easily read the logs -

LogFormat \
"\"%h\",%{%Y%m%d%H%M%S}t,%>s,\"%b\",\"%{Conten t-Type}o\", \
\"%U\",\"%{Referer}i\",\"%{User-Agent}i\""

In order to load the log file in the logging format into MySQL, you can process the following -

LOAD DATA INFILE '/local/access_log' INTO TABLE tbl_name
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'

The named table should be created to have columns which correspond to the LogFormat line writes to the log file.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 22:45.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.