Table of contents Previous: XCD WMORTE Next: XCD statdisp

gribadmin

Unix command for managing the MySQL database used by the GRIB server.


Formats

gribadmin makedb
gribadmin removedb
gribadmin fields
gribadmin num  model
gribadmin latest  model


Parameters

makedb

makes the database from scratch with the following attributes:

  • the database is named mcrtgrib
  • the read-only user is gribread and has no password
  • the read-write user is gribwrite with password gribwrite

removedb 

removes the database completely from MySQL

fields

prints the fields in the database and their data types

num

displays the number of records in the database; if model is not specified then the number of records for each model will be displayed; if total is specified then the total number of records in the database will be displayed

latest

displays the latest record in the database; if model is not specified then the latest record in the database will be displayed regardless of the model

model model/source name appearing in the GRIB files

Remarks

The makedb and removedb options will prompt for a password. Enter the password for the MySQL root user, which was set by the person that installed MySQL.

The Configuration Sections section of the gribadmin script appears in the box below. It contains variables that change its behavior. These variables must be reviewed before using the script. In particular, the mysql_path and gcc_lib_path variables may need to be changed.

#=========================================================
# Configuration Section:
#
# The variables in this section may need to be modified
# to conform to your system. 

# Database and user names for MySQL calls
database_name="mcrtgrib"
database_user="gribread"
 
   # Path to the MySQL executable
mysql_path=/usr/local/mysql/bin

# Path to gcc shared libraries
gcc_lib_path=/usr/local/lib

#=========================================================

 


Examples

gribadmin fields

This entry prints the fields in the database and their data types.

gribadmin latest GFS

This entry displays the latest record among GFS GRIB files in the database.


Table of contents Previous: XCD WMORTE Next: XCD statdisp