[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: doc(version_2_11_X) /install/linux install.pl
From: raeburn <raeburn () source ! lon-capa ! org>
Date: 2019-02-19 19:24:28
Message-ID: cvsraeburn1550604268 () cvsserver
[Download RAW message or body]
raeburn Tue Feb 19 19:24:28 2019 EDT
Modified files: (Branch: version_2_11_X)
/doc/install/linux install.pl
Log:
- For 2.11
Backport 1.50, 1.51, 1.52
Index: doc/install/linux/install.pl
diff -u doc/install/linux/install.pl:1.45.2.1 doc/install/linux/install.pl:1.45.2.2
--- doc/install/linux/install.pl:1.45.2.1 Sat Feb 16 16:19:11 2019
+++ doc/install/linux/install.pl Tue Feb 19 19:24:28 2019
@@ -75,7 +75,7 @@
&mt('Stopping execution.')."\n";
exit;
} else {
- print LOG '$Id: install.pl,v 1.45.2.1 2019/02/16 16:19:11 raeburn Exp $'."\n";
+ print LOG '$Id: install.pl,v 1.45.2.2 2019/02/19 19:24:28 raeburn Exp $'."\n";
}
#
@@ -1953,8 +1953,9 @@
sub setup_mysql_permissions {
my ($dbh,$has_pass,@mysql_lc_commands) = @_;
my ($mysqlversion,$mysqlsubver,$mysqlname) = &get_mysql_version();
- my ($usesauth,$hasauthcol,@mysql_commands);
+ my ($usesauth,$is_mariadb,$hasauthcol,@mysql_commands);
if ($mysqlname =~ /^MariaDB/i) {
+ $is_mariadb = 1;
if ($mysqlversion >= 10.2) {
$usesauth = 1;
} elsif ($mysqlversion >= 5.5) {
@@ -1968,8 +1969,12 @@
}
}
if ($usesauth) {
- @mysql_commands = ("INSERT user (Host, User, ssl_cipher, x509_issuer, \
x509_subject, authentication_string) \
VALUES('localhost','www','','','','')",
- "ALTER USER 'www'\@'localhost' IDENTIFIED BY \
'localhostkey'"); + @mysql_commands = ("INSERT user (Host, User, ssl_cipher, \
x509_issuer, x509_subject, authentication_string) \
VALUES('localhost','www','','','','')"); + if ($is_mariadb) {
+ push(@mysql_commands,"ALTER USER 'www'\@'localhost' IDENTIFIED BY \
'localhostkey'"); + } else {
+ push(@mysql_commands,"ALTER USER 'www'\@'localhost' IDENTIFIED WITH \
mysql_native_password BY 'localhostkey'"); + }
} elsif ($hasauthcol) {
@mysql_commands = ("INSERT user (Host, User, Password, ssl_cipher, \
x509_issuer, x509_subject, authentication_string) \
VALUES('localhost','www',password('localhostkey'),'','','','');"); } else {
@@ -2024,7 +2029,7 @@
}
}
if ($got_passwd) {
- my (@newpass_cmds) = &new_mysql_rootpasswd($newmysqlpass,$usesauth);
+ my (@newpass_cmds) = \
&new_mysql_rootpasswd($newmysqlpass,$usesauth,$is_mariadb); \
push(@mysql_commands,@newpass_cmds); } else {
print_and_log(&mt('Failed to get MySQL root password from user \
input.')."\n"); @@ -2054,10 +2059,15 @@
}
sub new_mysql_rootpasswd {
- my ($currmysqlpass,$usesauth) = @_;
+ my ($currmysqlpass,$usesauth,$is_mariadb) = @_;
if ($usesauth) {
- return ("ALTER USER 'root'\@'localhost' IDENTIFIED BY '$currmysqlpass'",
- "FLUSH PRIVILEGES;");
+ if ($is_mariadb) {
+ return ("ALTER USER 'root'\@'localhost' IDENTIFIED BY '$currmysqlpass'",
+ "FLUSH PRIVILEGES;");
+ } else {
+ return ("ALTER USER 'root'\@'localhost' IDENTIFIED WITH \
mysql_native_password BY '$currmysqlpass'", + "FLUSH \
PRIVILEGES;"); + }
} else {
return ("SET PASSWORD FOR 'root'\@'localhost'=PASSWORD('$currmysqlpass')",
"FLUSH PRIVILEGES;");
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic