Changeset 34008 for trunk/tools/regpeek.pl
- Timestamp:
- Jun 13, 2012, 4:45:18 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/tools/regpeek.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.
