Skip to content

Commit 09560c6

Browse files
author
jperkin@production.mysql.com
committed
Merge production.mysql.com:/usersnfs/jperkin/bk/build/5.0
into production.mysql.com:/usersnfs/jperkin/bk/build/5.1
2 parents 6598c8d + 583a3ef commit 09560c6

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

mysql-test/mysql-test-run.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3082,6 +3082,7 @@ ($$)
30823082
mtr_appendfile_to_file("$path_sql_dir/fill_help_tables.sql",
30833083
$bootstrap_sql_file);
30843084

3085+
# Remove anonymous users
30853086
mtr_tofile($bootstrap_sql_file,
30863087
"DELETE FROM mysql.user where user= '';");
30873088

scripts/mysql_install_db.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,16 @@ then
407407
echo "To do so, start the server, then issue the following commands:"
408408
echo "$bindir/mysqladmin -u root password 'new-password'"
409409
echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
410+
echo
411+
echo "Alternatively you can run:"
412+
echo "$bindir/mysql_secure_installation"
413+
echo
414+
echo "which will also give you the option of removing the test"
415+
echo "databases and anonymous user created by default. This is"
416+
echo "strongly recommended for production servers."
417+
echo
410418
echo "See the manual for more instructions."
419+
echo
411420

412421
if test "$in_rpm" -eq 0 -a "$source_install" -eq 0
413422
then

scripts/mysql_system_tables_data.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@ CREATE TEMPORARY TABLE tmp_user LIKE user;
1717
INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
1818
REPLACE INTO tmp_user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
1919
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
20+
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
21+
INSERT INTO tmp_user (host,user) VALUES (@@hostname,'');
2022
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
2123
DROP TABLE tmp_user;

0 commit comments

Comments
 (0)