Change the Makefile
and set PREFIX (e.g. PREFIX=/usr/local)
to the directory, where the "include"-dir
of mysql resides.

Afterwards, you may want to create the examples.
You need to have mysqlc.c and mysql.pas in scope of
gpc, so put them into your examples-dir or
into the units dir.

Then call 
make all
to create the executables.

If you are not familiar with the Pascal-Interface of Mysql,
try the examples in the following order:

1
Connect.pas (connect)
It just prints out the version-number of Mysql
Output is similar to

  3.23.42-log


2
MysqlListDbs.pas (mysqllistdbs)
prints out the names of the databases, mysql finds in your system.
Output is similar to

  mysql
  test


3
Fetchfield.pas (fetchfield)
Prints out the names of the fields of a created database
using MysqlFetchField. See, that ths example creates a
databass and a table by its own. This example fails, if the
database with the name "test_mysqlunit" already exists.
Output is similar to:

  Create Database 'test_mysqlunit'..done.
  Select Db to 'test_mysqlunit'..done.
  Create Table 'mysqltest'..done.
  0) nr
  1) firstname
  2) lastname
  Clean up..done.


4
Fetchfields.pas (fetchfields)
Prints out the names of the fields of a created database
using MysqlFetchFields. Output and structure of the program
is like Fetchfield.pas (fetchfield)

5
SimpleQuery.pas (simplequery)
Creates a database and a table in it. Then, it populates
the newly created table with some rows and prints them out of
your table. Afterwards, drops the database.
Output is similar to:
 
 Create Database 'test_mysqlunit'..done.
 Select Db to 'test_mysqlunit'..done.
 Create Table 'mysqltest'..done.
 Populate the table..done.
 Number of Rows= 6 Number of Fields= 3
 0) 1 Anne Clark
 1) 2 Robert Smith
 2) 3 Paul Newman
 3) 4 Jane Fonda
 4) 5 Karl Marx
 5) 6 Bob Marley
 Clean up..done.


6
RowSeekTell.pas (rowseektell)
Uses MysqlRowTell to save the offset of a given row
and jumps to it with MysqlRowSeek
Output is similar to:

 Create Database 'test_mysqlunit'..done.
 Select Db to 'test_mysqlunit'..done.
 Create Table 'mysqltest'..done.
 Populate the table..done.
 1 Anne Clark
 2 Robert Smith
 3 Paul Newman
 4 Jane Fonda
 5 Karl Marx
 6 Bob Marley
 after MysqlRowSeek: 3 Paul Newman
 Clean up..done.


7
ProcessList.pas (processlist)
Shows some information about Processes, mysql handles.
Needs mysql-root-password!
Output is similar to:

 mysql-root password:

 4,proger,localhost,test,Sleep,8086,
 57,root,localhost,,Processlist,0,


************************************************
	Have fun with it!

