Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
25154543
Commit
25154543
authored
Jul 26, 2012
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Plain Diff
Merge of patch for Bug#13741677 from mysql-5.1.
parents
35785ed8
55f3fd4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
scripts/mysql_secure_installation.pl.in
scripts/mysql_secure_installation.pl.in
+7
-3
scripts/mysql_secure_installation.sh
scripts/mysql_secure_installation.sh
+13
-5
No files found.
scripts/mysql_secure_installation.pl.in
View file @
25154543
#!/usr/bin/perl
# -*- cperl -*-
#
# Copyright (c) 2007, 201
0
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 201
2
, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -28,7 +28,7 @@ my $mysql; # How to call the mysql client
my
$rootpass
=
"";
$SIG
{
QUIT
}
=
$SIG
{
INT
}
=
sub
{
$SIG
{
QUIT
}
=
$SIG
{
INT
}
=
$SIG
{
TERM
}
=
$SIG
{
ABRT
}
=
$SIG
{
HUP
}
=
sub
{
print
"
\n
Aborting!
\n\n
";
echo_on
();
cleanup
();
...
...
@@ -242,7 +242,11 @@ sub reload_privilege_tables {
}
sub
cleanup
{
unlink
(
$config
,
$command
);
print
"
Cleaning up...
\n
";
foreach
my
$file
(
$config
,
$command
)
{
unlink
$file
or
warn
"
Warning: Could not unlink
$file
: $!
\n
";
}
}
...
...
scripts/mysql_secure_installation.sh
View file @
25154543
#!/bin/sh
# Copyright (c) 2002, 201
0
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2002, 201
2
, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -19,7 +19,7 @@ config=".my.cnf.$$"
command
=
".mysql.
$$
"
mysql_client
=
""
trap
"interrupt"
2
trap
"interrupt"
1 2 3 6 15
rootpass
=
""
echo_n
=
...
...
@@ -139,13 +139,16 @@ set_root_password() {
if
[
$?
-eq
0
]
;
then
echo
"Password updated successfully!"
echo
"Reloading privilege tables.."
reload_privilege_tables
||
exit
1
reload_privilege_tables
if
[
$?
-eq
1
]
;
then
clean_and_exit
fi
echo
rootpass
=
$password1
make_config
else
echo
"Password update failed!"
exit
1
clean_and_exit
fi
return
0
...
...
@@ -157,7 +160,7 @@ remove_anonymous_users() {
echo
" ... Success!"
else
echo
" ... Failed!"
exit
1
clean_and_exit
fi
return
0
...
...
@@ -217,6 +220,11 @@ cleanup() {
rm
-f
$config
$command
}
# Remove the files before exiting.
clean_and_exit
()
{
cleanup
exit
1
}
# The actual script starts here
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment