        Connecting to MySQL or ODBC driver with OOo
        -------------------------------------------

    This is a bit longer document which deals with all the steps to start using MySQL server. The document is long because of the cumbersome procedure to see the database :(

1.  Install MySQL.
    Get the sources/binaries from http://dev.mysql.com/.
   
    1.1 Start MySql server
    
        By default most of the operation system does not start this service.
        #/etc/init.d/mysql start
        it will ask you to create a login and password.
        #/usr/bin/mysqladmin -u root -h 'your.machine.host.name' password '****'

    1.2 Test the server
    
        #mysql 
        #mysql> show databases;
        #mysql> use test; //test is the default database that comes with mysql
        #mysql> show tables; //Will be empty b'se by default there is no tables.

    1.3 Create table and insert values
    
        #mysql> create table abc (Name varchar(20), age varchar(4));
        #mysql> insert into abc values ('kid1','5');

        Now repeat the steps in 1.2 will show the data.

    1.4 Test the table

        Use step 1.3 to create more entries
        #mysql> select * from abc; //This will show all the entries :)


        These steps are more than sufficient to know that you have a table up and running.

2.  Installing mysql-ODBC connector

    Chances of this package present in your OS will be less so follow the steps.
    
    2.1 Installing 
    
        Get the binaries/sources from http://dev.mysql.com/downloads/connector/odbc/3.51.html
        For me the binaries worked :)
        Assuming that binary file is download.
    
        #rpm -i --nosignature MyODBC-3.51.11-2.i586.rpm
        Do not ask me why there is a "nosignature" it was cribbing for me :(
    
        This will create 2 files:
        a> /etc/unixODBC/odbcinst.ini
            [MySQL ]
            DRIVER      = /usr/lib/libmyodbc3.so
            SETUP       = /usr/lib/libmyodbc3S.so
            UsageCount      = 1

            This is an autogenerated file so DO NOT modify.

        b> /etc/unixODBC/odbc.ini
            This will be a blank file.

            Put the following lines into this file!!

            [MySQL-test]
        Description = abc
        Driver      = MySQL
        Server      = localhost
        Database    = test
        Port        = 3306

    2.2 Testing the Connector
        # isql MySQL-test test
    
        A successful will show the following on the screen
    
        +---------------------------------------+
        | Connected!                            |
        |                                       |
        | sql-statement                         |
        | help [tablename]                      |
        | quit                                  |
        |                                       |
        +---------------------------------------+
        SQL>

3.  Use OOo to connect to MySql Server
    
    3.1 Steps
        - Open OOo
        - File->new->database
        - Select connect to exsisting database. Select MySql. Next
        - Select connect using ODBC. Next
        - Name of the Database sourse click on the Browse button will show "MySql-test".Next
        - UserName : root. Choose Password required. Next 
        //UserName and Password depends on the way you have configured MySql :)
        - Finish.
        - A popup dialog comes up give proper name ex: MySql-ODBC-data
    
    3.2 View the table
        -Open OOo writer
        - F4 will show "MySql-ODBC-data".

4. Use OOo to connect to ODBC
    This is similar to the MySql Connection
    In the previous 3.1 Select connect to exsisting database. Select ODBC. Next
    rest is same :)
    
5. Connect to remote MySQL server
    Read "data-from-remote-mysql-server.txt" :)

