summaryrefslogtreecommitdiffstats
path: root/scripts/mysql_setpermission.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:33:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:33:02 +0000
commit4fa488fb0159c629483b7994aa84e73926b132b9 (patch)
tree182a19db69cdcb92be54cc6a5b0b9bfab28f80fd /scripts/mysql_setpermission.sh
parentAdding debian version 1:10.11.6-2. (diff)
downloadmariadb-4fa488fb0159c629483b7994aa84e73926b132b9.tar.xz
mariadb-4fa488fb0159c629483b7994aa84e73926b132b9.zip
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/mysql_setpermission.sh')
-rw-r--r--scripts/mysql_setpermission.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/mysql_setpermission.sh b/scripts/mysql_setpermission.sh
index b3c9c27c..aa165a5e 100644
--- a/scripts/mysql_setpermission.sh
+++ b/scripts/mysql_setpermission.sh
@@ -68,7 +68,7 @@ usage() if ($opt_help); # the help function
if ($opt_host =~ s/:(\d+)$//)
{
- $opt_port = $1;
+ $opt_port = $1;
}
if ($opt_host eq '')
@@ -98,7 +98,7 @@ my $prefix= 'mysql';
if (eval {DBI->install_driver("MariaDB")}) {
$dsn ="DBI:MariaDB:;";
$prefix= 'mariadb';
-}
+}
else {
$dsn = "DBI:mysql:;";
}
@@ -226,11 +226,11 @@ sub setpwd
{
$pass = "PASSWORD(". $dbh->quote($pass) . ")";
}
- my $uh= "$user@$host";
+ my $uh= $user."@".$host;
my $sth = $dbh->prepare("set password for $uh =$pass") || die $dbh->errstr;
$sth->execute || die $dbh->errstr;
$sth->finish;
- print "The password is set for user $user.\n\n";
+ print "The password is set for user $uh.\n\n";
}