文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Using MySQL with Apache

Using MySQL with Apache

时间:2006-09-20  来源:火鸡

Using MySQL with Apache

There are programs that let you authenticate your users from a MySQL database and also let you write your log files into a MySQL table. You can change the Apache logging format to be easily readable by MySQL by putting the following into the Apache configuration file:
LogFormat \ "\"%h\",%{%Y%m%d%H%M%S}t,%>s,\"%b\",\"%{Content-Type}o\", \ \"%U\",\"%{Referer}i\",\"%{User-Agent}i\""
To load a log file in that format into MySQL, you can use a statement something like this:
LOAD DATA INFILE '/local/access_log' INTO TABLE tbl_nameFIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'
The named table should be created to have columns that correspond to those that the LogFormat line writes to the log file.
相关阅读 更多 +
排行榜 更多 +
冰封前线1941无限金币版

冰封前线1941无限金币版

策略塔防 下载
头文字d公路传说手机版

头文字d公路传说手机版

模拟经营 下载
火车站模拟器手机版

火车站模拟器手机版

模拟经营 下载