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

   ServerInfo    = 4.0.12
   ClientInfo    = 4.0.12
   ProtoInfo     = 10


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

   list all available databases (I see 2)
   ==============
   1) test
   2) test_2

Please note, that you may not see _all_ available databases.
Compare this result with `mysqlshow' from your MySQL-Distribution.


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_mysqlunit4" already exists.
Output is similar to:

   Create database test_mysqlunit4.... done
   Select created database.... done
   Create table mysqltest. done
   List all fields 
   1) nr
   2) firstname
   3) 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_mysqlunit4.... done
   Select created database.... done
   Create table flowers.... done
   Populate the table...done
   Rows: 3 Fields per row: 2
   1 Rose 
   2 Cyclamen 
   3 Pansy 
   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_mysqlunit4.... done
   Select created database.... done
   Create table flowers.... done
   Populate the table...done
   1 Rose 
   2 Cyclamen 
   3 Pansy 
   4 Lily of the valley 
   After MySQLRowSeek: 
   2 Cyclamen 
   Clean up. done

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

   Please enter MySQL-Root Password: secret007
   40, eike, localhost, , Sleep, 1757, , , 
   73, root, localhost, , Processlist, 0, , , 

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

