SQUIRREL Database

Setting up a Squirrel database on a localhost computer

What does Squirrel do

  • Squirrel is still very much under developement but it is hoped that this will be a much easier and consistant way with which to retrieve and play with data obtained from the Antarctic, because of porting and routing issues we recommend that this server sit within the local domain, rather than in a DMZ or sit on the Internet.
  • Squirrel will when finished be able to run as a scheduled program or cron specifically to retreive data, originating from the Antarctic, this data is collected and deposited into a database in this case called SQUIRREL but can in fact be called anything that takes your fancy.
  • Efforts have been made by our developer Anthony Shaper (SoSLUG) to maintain data integrity
  • By setting this server within your local domain all host computers connected to the same domain can utilise the data stored on the server
  • It is assumed throughout this procedure that your level of understanding in linux is sufficient to carry out the task below.

Installing a Mysql server

If you are using Ubuntu or Debian type the following commands to install mysql:-

apt-get update
apt-get upgrade
apt-get install mysql-server-4.1

All dependencies should be satisfied, mysql should be running

We assume that you have taken all necessary steps to install and configure this server correctly and know the root account paasword for Mysql which will or may be different to the root account password for your system.

If miraculosly you have not openned a terminal window please do so now as either "root" or a user account no preference.

mysql -u root -p
Enter Password:

# mysql enters a console mode denoted by "mysql>" if this is shown in your console all is fine your password if given has been accepted.

mysql>create database SQUIRREL;

mysql>use SQUIRREL;

mysql> grant all privileges on SQUIRREL.* to 'squirrel_dbu'@'localhost' identified by 'Squ1rr3l';

mysql>create table ADJ_DATA ( ARGOS INT, Date CHAR(6), Time DOUBLE, T FLOAT, P FLOAT, SPD FLOAT, DIR INT, RH FLOAT, LAT FLOAT, LON FLOAT );

# Both the Database and the Table name have been initialesed in CAPS. I try to adopt procedures in my working this is one of them usernames are lower case and Passwords are always mixed Alphanumeric

# We do intend that the squirrel program will do the rest of the work for you and when run as a schedule program or cron will happily a mass a significant amount of data to your database SQUIRREL. At present we are not yet ready to release the program to update the SQUIRREL database directly, so we have another called massage1.pl. As this program will remain on the website for you to download examine and alter to your own ends, you can use this program in the following manner in conjuction with the current "squirrel.pl" program which transcribes the data to text files only.

# "squirrel.pl" we assume you have running as a cron job or some other scheduling program this single program updates as many times as it is told to from the cron job we run this every four hours. This retreives data from all listed bases at Antarctica and places them in individual named files for each base. This is a pain as at present we manually massage the data to strip unwanted elements and prepare the data to import into mysql.

# We do this in another terminal or exit "mysql"

massage1.pl <Alessandra\ 7351\ \(IT\) >Alesandra_out

We do this to each file contained in the directory and prepare the data ready to import into mysql, this does not import any data into mysql itself, we need to be in mysql to load and convert text data into sql format.

login or register to post comments