
User login |
SQUIRREL DatabaseSetting up a Squirrel database on a localhost computerWhat does Squirrel do
Installing a Mysql serverIf you are using Ubuntu or Debian type the following commands to install mysql:- apt-get update 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 # 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. |