version 1.38, 2016/08/25 17:39:04
|
version 1.42, 2017/05/26 02:18:11
|
Line 454 sub check_mysql_running {
|
Line 454 sub check_mysql_running {
|
$proc_owner = 'mysql'; |
$proc_owner = 'mysql'; |
$use_systemctl = 1; |
$use_systemctl = 1; |
} |
} |
if ($1 >= 22) { |
if ($1 >= 19) { |
$mysqldaemon ='mariadb'; |
$mysqldaemon ='mariadb'; |
} |
} |
} elsif ($distro =~ /^(?:centos|rhes|scientific)(\d+)/) { |
} elsif ($distro =~ /^(?:centos|rhes|scientific)(\d+)/) { |
Line 467 sub check_mysql_running {
|
Line 467 sub check_mysql_running {
|
} elsif ($distro =~ /^sles(\d+)/) { |
} elsif ($distro =~ /^sles(\d+)/) { |
if ($1 >= 12) { |
if ($1 >= 12) { |
$use_systemctl = 1; |
$use_systemctl = 1; |
|
$proc_owner = 'mysql'; |
|
$process = 'mysqld'; |
} |
} |
} elsif ($distro =~ /^suse(\d+)/) { |
} elsif ($distro =~ /^suse(\d+)/) { |
if ($1 >= 13) { |
if ($1 >= 13) { |
Line 577 sub chkconfig {
|
Line 579 sub chkconfig {
|
$uses_systemctl{'memcached'} = 1; |
$uses_systemctl{'memcached'} = 1; |
$uses_systemctl{'cups'} = 1; |
$uses_systemctl{'cups'} = 1; |
} |
} |
if ($version >= 22) { |
if ($version >= 19) { |
$daemon{'mysql'} = 'mariadb'; |
$daemon{'mysql'} = 'mariadb'; |
} |
} |
} elsif ($distro =~ /^(?:centos|rhes|scientific)(\d+)/) { |
} elsif ($distro =~ /^(?:centos|rhes|scientific)(\d+)/) { |
Line 1787 CREATE TABLE IF NOT EXISTS metadata (tit
|
Line 1789 CREATE TABLE IF NOT EXISTS metadata (tit
|
sub setup_mysql_permissions { |
sub setup_mysql_permissions { |
my ($dbh,$has_pass,@mysql_lc_commands) = @_; |
my ($dbh,$has_pass,@mysql_lc_commands) = @_; |
my ($mysqlversion,$mysqlsubver,$mysqlname) = &get_mysql_version(); |
my ($mysqlversion,$mysqlsubver,$mysqlname) = &get_mysql_version(); |
my ($usesauth,@mysql_commands); |
my ($usesauth,$hasauthcol,@mysql_commands); |
if ($mysqlname =~ /^MariaDB/i) { |
if ($mysqlname =~ /^MariaDB/i) { |
if ($mysqlversion >= 10.2) { |
if ($mysqlversion >= 10.2) { |
$usesauth = 1; |
$usesauth = 1; |
|
} elsif ($mysqlversion >= 5.5) { |
|
$hasauthcol = 1; |
} |
} |
} else { |
} else { |
if (($mysqlversion > 5.7) || (($mysqlversion == 5.7) && ($mysqlsubver > 5))) { |
if (($mysqlversion > 5.7) || (($mysqlversion == 5.7) && ($mysqlsubver > 5))) { |
$usesauth = 1; |
$usesauth = 1; |
|
} elsif (($mysqlversion >= 5.6) || (($mysqlversion == 5.5) && ($mysqlsubver >= 7))) { |
|
$hasauthcol = 1; |
} |
} |
} |
} |
if ($usesauth) { |
if ($usesauth) { |
@mysql_commands = ("INSERT user (Host, User, ssl_cipher, x509_issuer, x509_subject) VALUES('localhost','www','','','')", |
@mysql_commands = ("INSERT user (Host, User, ssl_cipher, x509_issuer, x509_subject) VALUES('localhost','www','','','')", |
"ALTER USER 'www'\@'localhost' IDENTIFIED BY 'localhostkey'"); |
"ALTER USER 'www'\@'localhost' IDENTIFIED 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 { |
} else { |
@mysql_commands = ("INSERT user (Host, User, Password) VALUES('localhost','www',password('localhostkey'));"); |
@mysql_commands = ("INSERT user (Host, User, Password, ssl_cipher, x509_issuer, x509_subject) VALUES('localhost','www',password('localhostkey'),'','','');"); |
} |
} |
if ($mysqlversion < 4) { |
if ($mysqlversion < 4) { |
push (@mysql_commands," |
push (@mysql_commands," |