Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b7bd5ac

Browse files
author
Jason Harper
committed
Add support for servername field on phpMyAdmin login page
1 parent 05880e9 commit b7bd5ac

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ _Note_: The web interface of phpMyAdmin may change in the future and break this
3838
-e EXCLUDE_DBS, --exclude-dbs EXCLUDE_DBS
3939
comma-separated list of database names to exclude from
4040
the dump
41+
-s SERVER_NAME, --server-name SERVER_NAME
42+
mysql server hostname to supply if enabled as field on login page
4143
--compression {none,zip,gzip}
4244
compression method for the output file - must be
4345
supported by the server (default: none)

‎phpmyadmin_sql_backup.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
def download_sql_backup(url, user, password, dry_run=False, overwrite_existing=False, prepend_date=True, basename=None,
4242
output_directory=os.getcwd(), exclude_dbs=None, compression='none', prefix_format=None,
43-
timeout=60, http_auth=None, **kwargs):
43+
timeout=60, http_auth=None, server_name=None, **kwargs):
4444
prefix_format = prefix_format or DEFAULT_PREFIX_FORMAT
4545
exclude_dbs = exclude_dbs.split(',') or []
4646
encoding = '' if compression == 'gzip' else 'gzip'
@@ -52,6 +52,8 @@ def download_sql_backup(url, user, password, dry_run=False, overwrite_existing=F
5252

5353
g.doc.set_input_by_id('input_username', user)
5454
g.doc.set_input_by_id('input_password', password)
55+
if server_name:
56+
g.doc.set_input_by_id('input_servername', server_name)
5557
g.submit()
5658

5759
try:
@@ -113,6 +115,7 @@ def download_sql_backup(url, user, password, dry_run=False, overwrite_existing=F
113115
help='prepend current UTC date & time to the filename; see the --prefix-format option for custom formatting')
114116
parser.add_argument('-e', '--exclude-dbs', default='',
115117
help='comma-separated list of database names to exclude from the dump')
118+
parser.add_argument('-s', '--server-name', default=None, help='mysql server hostname to supply if enabled as field on login page')
116119
parser.add_argument('--compression', default='none', choices=['none', 'zip', 'gzip'],
117120
help='compression method for the output file - must be supported by the server (default: %(default)s)')
118121
parser.add_argument('--basename', default=None,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /