diff --git a/mythtv/programs/scripts/database/mythconverg_backup.pl b/mythtv/programs/scripts/database/mythconverg_backup.pl
index 6b3d0eb..e13ffbb 100755
|
a
|
b
|
|
| 13 | 13 | |
| 14 | 14 | # Script info |
| 15 | 15 | $NAME = 'MythTV Database Backup Script'; |
| 16 | | $VERSION = '1.0.12'; |
| | 16 | $VERSION = '1.0.13'; |
| 17 | 17 | |
| 18 | 18 | # Some variables we'll use here |
| 19 | 19 | our ($username, $homedir, $mythconfdir, $database_information_file); |
| … |
… |
EOF
|
| 700 | 700 | { |
| 701 | 701 | my $have_database_libs = check_database_libs; |
| 702 | 702 | return 0 if ($have_database_libs < 2); |
| | 703 | my $temp_host = $mysql_conf{'db_host'}; |
| | 704 | if ($temp_host =~ /:/) |
| | 705 | { |
| | 706 | if ($temp_host =~ /^(?!\[).*(?!\])$/) |
| | 707 | { |
| | 708 | $temp_host = "[$temp_host]"; |
| | 709 | } |
| | 710 | } |
| 703 | 711 | $dbh = DBI->connect("dbi:mysql:". |
| 704 | | "database=$mysql_conf{'db_name'}:". |
| 705 | | "host=$mysql_conf{'db_host'}", |
| | 712 | "host=$temp_host:". |
| | 713 | "database=$mysql_conf{'db_name'}", |
| 706 | 714 | "$mysql_conf{'db_user'}", |
| 707 | 715 | "$mysql_conf{'db_pass'}", |
| 708 | | { PrintError => 0 }); |
| | 716 | { PrintError => 1 }); |
| 709 | 717 | } |
| 710 | 718 | return 1; |
| 711 | 719 | } |
diff --git a/mythtv/programs/scripts/database/mythconverg_restore.pl b/mythtv/programs/scripts/database/mythconverg_restore.pl
index 62a60d2..42c0f68 100755
|
a
|
b
|
|
| 13 | 13 | |
| 14 | 14 | # Script info |
| 15 | 15 | $NAME = 'MythTV Database Restore Script'; |
| 16 | | $VERSION = '1.0.18'; |
| | 16 | $VERSION = '1.0.19'; |
| 17 | 17 | |
| 18 | 18 | # Some variables we'll use here |
| 19 | 19 | our ($username, $homedir, $mythconfdir, $database_information_file); |
| … |
… |
EOF
|
| 915 | 915 | my $use_db = shift; |
| 916 | 916 | my $show_errors = shift; |
| 917 | 917 | my $result = 1; |
| 918 | | my $connect_string = 'dbi:mysql:database='; |
| | 918 | my $connect_string = 'dbi:mysql'; |
| | 919 | my $temp_host = $mysql_conf{'db_host'}; |
| | 920 | if ($temp_host =~ /:/) |
| | 921 | { |
| | 922 | if ($temp_host =~ /^(?!\[).*(?!\])$/) |
| | 923 | { |
| | 924 | $temp_host = "[$temp_host]"; |
| | 925 | } |
| | 926 | } |
| | 927 | $connect_string .= ":host=$temp_host"; |
| 919 | 928 | if ($use_db) |
| 920 | 929 | { |
| 921 | | $connect_string .= $mysql_conf{'db_name'}; |
| | 930 | $connect_string .= ":database=$mysql_conf{'db_name'}"; |
| 922 | 931 | } |
| 923 | | $connect_string .= ":host=$mysql_conf{'db_host'}"; |
| 924 | 932 | $dbh->disconnect if (defined($dbh)); |
| 925 | 933 | $dbh = DBI->connect($connect_string, |
| 926 | 934 | "$mysql_conf{'db_user'}", |
| 927 | 935 | "$mysql_conf{'db_pass'}", |
| 928 | | { PrintError => 0 }); |
| | 936 | { PrintError => 1 }); |
| 929 | 937 | $result = 0 if (!defined($dbh)); |
| 930 | 938 | if ($show_errors && !defined($dbh)) |
| 931 | 939 | { |