Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
76c120ec
Commit
76c120ec
authored
14 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Added --mport/-mP command line switch for setting non-standard master
server port.
parent
14f76a3b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/production_database/scripts/update_database_list.pl
+10
-2
10 additions, 2 deletions
...ripts/production_database/scripts/update_database_list.pl
with
10 additions
and
2 deletions
misc-scripts/production_database/scripts/update_database_list.pl
+
10
−
2
View file @
76c120ec
...
...
@@ -11,7 +11,7 @@ sub usage {
print
<<USAGE_END;
Usage:
$0 --release NN --master master-server \\
$0 --release NN --master master-server
--mport master-port
\\
$padding --server server1 --server server2 [...] \\
$padding --dbport 3306 --dbuser user --dbpass passwd \\
$padding --dbwuser write_user --dbwpass write_passwd
...
...
@@ -28,6 +28,10 @@ where
--master/-m The master server where the production database lives
(optional, default is 'ens-staging1').
--mport/-mP The port ont he master serve to connect to
(optional, default is '3306').
--server/-s A database server (optional, may occur several times,
default is 'ens-staging1', and 'ens-staging2').
...
...
@@ -35,11 +39,13 @@ where
--dbuser/-u The (read only) user to connect as (optional,
default is 'ensro').
--dbpass/-p The password to connect with as the above user
(optional, no default).
--dbwuser/-wu The user (with write permissions) to connect as
(optional, default is 'ensadmin').
--dbwpass/-wp The password to connect with as the above user
(optional, no default).
...
...
@@ -76,6 +82,7 @@ ABOUT_END
my
$release
;
my
@servers
;
my
$master
=
'
ens-staging1
';
my
$mport
=
'
3306
';
my
$dbport
=
'
3306
';
my
(
$dbwuser
,
$dbwpass
)
=
(
'
ensadmin
',
undef
);
...
...
@@ -86,6 +93,7 @@ my $opt_about = 0;
if
(
!
GetOptions
(
'
release|r=s
'
=>
\
$release
,
'
master|m=s
'
=>
\
$master
,
'
mport|mP=i
'
=>
\
$mport
,
'
server|s=s@
'
=>
\
@servers
,
'
dbuser|u=s
'
=>
\
$dbuser
,
'
dbpass|p=s
'
=>
\
$dbpass
,
...
...
@@ -119,7 +127,7 @@ my %found_databases;
{
my
$dsn
=
sprintf
(
'
DBI:mysql:host=%s;port=%d;database=%s
',
$master
,
$
db
port
,
'
ensembl_production
'
);
$master
,
$
m
port
,
'
ensembl_production
'
);
my
$dbh
=
DBI
->
connect
(
$dsn
,
$dbuser
,
$dbpass
,
{
'
PrintError
'
=>
1
,
'
RaiseError
'
=>
1
}
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment