Changeset 34008
- Timestamp:
- Jun 13, 2012, 4:45:18 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
ippScripts/scripts/nightly_science.pl (modified) (1 diff)
-
tools/regpeek.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/nightly_science.pl
r33863 r34008 2052 2052 2053 2053 sub init_gpc_db { 2054 ## change to use the site.config setting, however may want to use replicated scidbs instead 2055 my $ipprc = PS::IPP::Config->new(); # IPP Configuration 2056 my $siteConfig = $ipprc->{_siteConfig}; 2054 2057 use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock'; 2055 my $dbserver = 'ippdb01';2058 # my $dbserver = 'ippdb01'; 2056 2059 my $dbuser = 'ippuser'; 2057 2060 my $dbpass = 'ippuser'; 2061 my $dbserver = metadataLookupStr($siteConfig, 'DBSERVER'); 2062 die "database configuration not set up" unless defined($dbserver); 2058 2063 $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" . 2059 2064 "mysql_socket=" . DB_SOCKET(), -
trunk/tools/regpeek.pl
r32419 r34008 3 3 use DBI; 4 4 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 5 use PS::IPP::Config 1.0.1 qw( :standard ); 5 6 6 7 my $dbname = 'gpc1'; … … 65 66 66 67 sub init_gpc_db { 68 ## change to use the site.config setting now, however may want to use replicated scidbs instead 69 my $ipprc = PS::IPP::Config->new(); # IPP Configuration 70 my $siteConfig = $ipprc->{_siteConfig}; 67 71 use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock'; 68 my $dbserver = 'ippdb01';72 # my $dbserver = 'ippdb01'; 69 73 my $dbuser = 'ippuser'; 70 74 my $dbpass = 'ippuser'; 75 my $dbserver = metadataLookupStr($siteConfig, 'DBSERVER'); 76 die "database configuration not set up" unless defined($dbserver); 71 77 $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" . 72 78 "mysql_socket=" . DB_SOCKET(), 73 79 ${dbuser},${dbpass}, 74 { RaiseError => 1, AutoCommit => 1}80 { RaiseError => 1, AutoCommit => 1} 75 81 ) or die "Unable to connect to database $DBI::errstr\n"; 76 82 return($db);
Note:
See TracChangeset
for help on using the changeset viewer.
