Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: remove duplicate "create database iepm" text.

...

The accounts are defined by issuing grants to the account for accessing the data base.
Create a file named pws in /home/iepm/mysql i.e.

Code Block
	touch /home/iepm/mysql/pws

edit the file and put the password of your iepm mysql account in it.
Create the IEPM data base. Log into MySQL with the root account and password and issue the following command:

...


Create the IEPM data base. Log into MySQL with the root account and password and issue the following command:

...

Code Block
# For the web server account (may be nobody or apache or other) - no password
grant select on iepm.* to apache@localhost;
grant select on iepm.* to apache@'202.83.167.108';
grant select on iepm.* to apache@iepm-ncp;
grant select on iepm.* to apache@'iepm-ncp.ncp.edu.pk';
grant file on *.* to apache;    

Creating Tables

Create the tables in iepm database. The scripts of these tables can be found here. However you can use the SQL queries in the files in create tables directory. Create tables by giving these files as input to mysql. Please check if you might need to change nodes.txt in case you have different paths for ping, grep, traceroute etc. Use the command

Code Block
	mysql -u root -p > file_name Database name

For example, for creating monhost table in iepm database

Code Block
	 mysql -u root -p > monhost.txt iepm

...

Next comes the loading of data in to the database tables. Look at the following links of tables at SLAC IEPM node to have some idea of the data to be inserted in the database tables.

http://www.slac.stanford.edu/comp/net/iepm-bw.slac.stanford.edu/monitoring-hosts.htmlImage Removed
http://www.slac.stanford.edu/comp/net/iepm-bw.slac.stanford.edu/NODESPECS.htmlImage Removed
http://www.slac.stanford.edu/comp/net/iepm-bw.slac.stanford.edu/targets-iepm-bw.slac.stanford.edu.htmlImage Removed
http://www.slac.stanford.edu/comp/net/iepm-bw.slac.stanford.edu/toolspecs.htmlImage Removed
http://www.slac.stanford.edu/comp/net/iepm-bw.slac.stanford.edu/plotspecs/pltspecs-entries.htmlImage Removed

The scripts for populating the database tables are located in v3src/mysql. You can load tables with data using CSV files. Other way you can also create your own queries, put them in a file and give as input to mysql using the command

Code Block
	mysql -u root -p  > file_name  databasename

...