manual common programs KR7UQGCY5ABVVPZA7JCDT3WWPKC2OND2RHZC63Q






MySQL Reference Manual for version 3.23.39. - 20 Using MySQL with Some Common Programs
code {color:purple} tt {color:green} samp {color:navy} pre {color:maroon}


Go to the first, previous, next, last section, table of contents.



20 Using MySQL with Some Common Programs


This chapter describes how to use MySQL with some common programs.



In this chapter you will:






Learn how to easily store your Apache log files in a MySQL
database.


Find some tips on how to compile MySQL and MySQL-based
programs using Borland C++.






20.1 Using MySQL with Apache


The Contrib section includes programs that let you authenticate your
users from a MySQL database and also let you log your log files
into a MySQL table. See section D Contributed Programs.



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\""



In MySQL you can do something like this:




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






20.2 Borland C++


You can compile the MySQL Windows source with Borland C++ 5.02.
(The Windows source includes only projects for Microsoft VC++, for
Borland C++ you have to do the project files yourself).



One known problem with Borland C++ is that it uses a different structure
alignment than VC++. This means that you will run into problems if you
try to use the default libmysql.dll libraries (that was compiled
with VC++) with Borland C++. You can do one of the following to avoid
this problem.






You can use the static MySQL libraries for Borland C++ that you
can find on http://www.mysql.com/downloads/os-win32.html.


Only call mysql_init() with NULL as an argument, not a
pre-allocated MYSQL struct.






Go to the first, previous, next, last section, table of contents.




Wyszukiwarka

Podobne podstrony:
manual Common programs
manual common problems
manual Common problems
CARPROG Opel ECU programmer user manual
RDA1846 Programming manual
fanuc ot cnc program manual gcodetrainingX8(1)
Genicom 5000 Programmer s Manual
CarProg RENAULT key programmer manual
zestawy cwiczen przygotowane na podstawie programu Mistrz Klawia 6
Aquarium Aquaristik Amtra Manual Phosphatreduct

więcej podobnych podstron