| 1 |
SELECT plugin into @plugin from mysql.user where user= 'root' and host='localhost'; |
| 2 |
SELECT password_last_changed into @plc from mysql.user where user= 'root' and host='localhost'; |
| 3 |
SELECT authentication_string into @auth_str from mysql.user where user= 'root' and host='localhost'; |
| 4 |
SELECT user_attributes into @user_attrib from mysql.user where user='root' and host='localhost'; |
| 5 |
SELECT plugin into @sys_plugin from mysql.user where user= 'mysql.sys' and host='localhost'; |
| 6 |
SELECT password_last_changed into @sys_plc from mysql.user where user= 'mysql.sys' and host='localhost'; |
| 7 |
SELECT authentication_string into @sys_auth_str from mysql.user where user= 'mysql.sys' and host='localhost'; |
| 8 |
call mtr.add_suppression("Dictionary file not specified"); |
| 9 |
SET PASSWORD for root@localhost = ''; |
| 10 |
|
| 11 |
Securing the MySQL server deployment. |
| 12 |
|
| 13 |
Connecting to MySQL using a blank password. |
| 14 |
|
| 15 |
VALIDATE PASSWORD COMPONENT can be used to test passwords |
| 16 |
and improve security. It checks the strength of password |
| 17 |
and allows the users to set only those passwords which are |
| 18 |
secure enough. Would you like to setup VALIDATE PASSWORD component? |
| 19 |
|
| 20 |
Press y|Y for Yes, any other key for No: Please set the password for root here. |
| 21 |
|
| 22 |
New password: |
| 23 |
|
| 24 |
Re-enter new password: |
| 25 |
By default, a MySQL installation has an anonymous user, |
| 26 |
allowing anyone to log into MySQL without having to have |
| 27 |
a user account created for them. This is intended only for |
| 28 |
testing, and to make the installation go a bit smoother. |
| 29 |
You should remove them before moving into a production |
| 30 |
environment. |
| 31 |
|
| 32 |
Remove anonymous users? (Press y|Y for Yes, any other key for No) : |
| 33 |
... skipping. |
| 34 |
|
| 35 |
|
| 36 |
Normally, root should only be allowed to connect from |
| 37 |
'localhost'. This ensures that someone cannot guess at |
| 38 |
the root password from the network. |
| 39 |
|
| 40 |
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : |
| 41 |
... skipping. |
| 42 |
By default, MySQL comes with a database named 'test' that |
| 43 |
anyone can access. This is also intended only for testing, |
| 44 |
and should be removed before moving into a production |
| 45 |
environment. |
| 46 |
|
| 47 |
|
| 48 |
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : |
| 49 |
... skipping. |
| 50 |
Reloading the privilege tables will ensure that all changes |
| 51 |
made so far will take effect immediately. |
| 52 |
|
| 53 |
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Execution number 1 was successful |
| 54 |
Enter password: |
| 55 |
|
| 56 |
Securing the MySQL server deployment. |
| 57 |
|
| 58 |
|
| 59 |
VALIDATE PASSWORD COMPONENT can be used to test passwords |
| 60 |
and improve security. It checks the strength of password |
| 61 |
and allows the users to set only those passwords which are |
| 62 |
secure enough. Would you like to setup VALIDATE PASSWORD component? |
| 63 |
|
| 64 |
Press y|Y for Yes, any other key for No: Using existing password for root. |
| 65 |
Change the password for root ? ((Press y|Y for Yes, any other key for No) : |
| 66 |
New password: |
| 67 |
|
| 68 |
Re-enter new password: |
| 69 |
By default, a MySQL installation has an anonymous user, |
| 70 |
allowing anyone to log into MySQL without having to have |
| 71 |
a user account created for them. This is intended only for |
| 72 |
testing, and to make the installation go a bit smoother. |
| 73 |
You should remove them before moving into a production |
| 74 |
environment. |
| 75 |
|
| 76 |
Remove anonymous users? (Press y|Y for Yes, any other key for No) : Success. |
| 77 |
|
| 78 |
|
| 79 |
Normally, root should only be allowed to connect from |
| 80 |
'localhost'. This ensures that someone cannot guess at |
| 81 |
the root password from the network. |
| 82 |
|
| 83 |
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Success. |
| 84 |
|
| 85 |
By default, MySQL comes with a database named 'test' that |
| 86 |
anyone can access. This is also intended only for testing, |
| 87 |
and should be removed before moving into a production |
| 88 |
environment. |
| 89 |
|
| 90 |
|
| 91 |
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : - Dropping test database... |
| 92 |
Success. |
| 93 |
|
| 94 |
- Removing privileges on test database... |
| 95 |
Success. |
| 96 |
|
| 97 |
Reloading the privilege tables will ensure that all changes |
| 98 |
made so far will take effect immediately. |
| 99 |
|
| 100 |
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Execution number 2 was successful |
| 101 |
Enter password: |
| 102 |
|
| 103 |
Securing the MySQL server deployment. |
| 104 |
|
| 105 |
|
| 106 |
VALIDATE PASSWORD COMPONENT can be used to test passwords |
| 107 |
and improve security. It checks the strength of password |
| 108 |
and allows the users to set only those passwords which are |
| 109 |
secure enough. Would you like to setup VALIDATE PASSWORD component? |
| 110 |
|
| 111 |
Press y|Y for Yes, any other key for No: |
| 112 |
There are three levels of password validation policy: |
| 113 |
|
| 114 |
LOW Length >= 8 |
| 115 |
MEDIUM Length >= 8, numeric, mixed case, and special characters |
| 116 |
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file |
| 117 |
|
| 118 |
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: Using existing password for root. |
| 119 |
|
| 120 |
Estimated strength of the password: 25 |
| 121 |
Change the password for root ? ((Press y|Y for Yes, any other key for No) : |
| 122 |
New password: |
| 123 |
|
| 124 |
Re-enter new password: |
| 125 |
|
| 126 |
Estimated strength of the password: 100 |
| 127 |
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : By default, a MySQL installation has an anonymous user, |
| 128 |
allowing anyone to log into MySQL without having to have |
| 129 |
a user account created for them. This is intended only for |
| 130 |
testing, and to make the installation go a bit smoother. |
| 131 |
You should remove them before moving into a production |
| 132 |
environment. |
| 133 |
|
| 134 |
Remove anonymous users? (Press y|Y for Yes, any other key for No) : Success. |
| 135 |
|
| 136 |
|
| 137 |
Normally, root should only be allowed to connect from |
| 138 |
'localhost'. This ensures that someone cannot guess at |
| 139 |
the root password from the network. |
| 140 |
|
| 141 |
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Success. |
| 142 |
|
| 143 |
By default, MySQL comes with a database named 'test' that |
| 144 |
anyone can access. This is also intended only for testing, |
| 145 |
and should be removed before moving into a production |
| 146 |
environment. |
| 147 |
|
| 148 |
|
| 149 |
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : - Dropping test database... |
| 150 |
Success. |
| 151 |
|
| 152 |
- Removing privileges on test database... |
| 153 |
Success. |
| 154 |
|
| 155 |
Reloading the privilege tables will ensure that all changes |
| 156 |
made so far will take effect immediately. |
| 157 |
|
| 158 |
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Execution number 3 was successful |
| 159 |
Enter password: |
| 160 |
|
| 161 |
Securing the MySQL server deployment. |
| 162 |
|
| 163 |
The 'validate_password' component is installed on the server. |
| 164 |
The subsequent steps will run with the existing configuration |
| 165 |
of the component. |
| 166 |
Using existing password for root. |
| 167 |
|
| 168 |
Estimated strength of the password: 100 |
| 169 |
Change the password for root ? ((Press y|Y for Yes, any other key for No) : |
| 170 |
New password: |
| 171 |
|
| 172 |
Re-enter new password: |
| 173 |
|
| 174 |
Estimated strength of the password: 25 |
| 175 |
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : ... Failed! Error: Your password does not satisfy the current policy requirements |
| 176 |
|
| 177 |
New password: |
| 178 |
|
| 179 |
Re-enter new password: |
| 180 |
|
| 181 |
Estimated strength of the password: 100 |
| 182 |
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : By default, a MySQL installation has an anonymous user, |
| 183 |
allowing anyone to log into MySQL without having to have |
| 184 |
a user account created for them. This is intended only for |
| 185 |
testing, and to make the installation go a bit smoother. |
| 186 |
You should remove them before moving into a production |
| 187 |
environment. |
| 188 |
|
| 189 |
Remove anonymous users? (Press y|Y for Yes, any other key for No) : Success. |
| 190 |
|
| 191 |
|
| 192 |
Normally, root should only be allowed to connect from |
| 193 |
'localhost'. This ensures that someone cannot guess at |
| 194 |
the root password from the network. |
| 195 |
|
| 196 |
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Success. |
| 197 |
|
| 198 |
By default, MySQL comes with a database named 'test' that |
| 199 |
anyone can access. This is also intended only for testing, |
| 200 |
and should be removed before moving into a production |
| 201 |
environment. |
| 202 |
|
| 203 |
|
| 204 |
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : - Dropping test database... |
| 205 |
Success. |
| 206 |
|
| 207 |
- Removing privileges on test database... |
| 208 |
Success. |
| 209 |
|
| 210 |
Reloading the privilege tables will ensure that all changes |
| 211 |
made so far will take effect immediately. |
| 212 |
|
| 213 |
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Execution number 4 was successful |
| 214 |
Enter password: Execution 5 was successful |
| 215 |
UNINSTALL COMPONENT "file://component_validate_password"; |
| 216 |
SET PASSWORD for root@localhost = ''; |
| 217 |
CREATE DATABASE test; |
| 218 |
REPLACE INTO mysql.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','Y','','','','',0,0,0,0,'mysql_native_password','','N',NULL,NULL,'N','Y','Y', NULL, NULL,NULL,NULL); |
| 219 |
REPLACE INTO mysql.user VALUES ('localhost','mysql.sys','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE','N',NULL,NULL,'Y','N','N', NULL, NULL,NULL,NULL); |
| 220 |
INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); |
| 221 |
UPDATE mysql.user SET password_last_changed=@plc, authentication_string=@auth_str, plugin= @plugin, user_attributes=@user_attrib where user='root'; |
| 222 |
UPDATE mysql.user SET password_last_changed=@sys_plc, authentication_string=@sys_auth_str, plugin= @sys_plugin where user='mysql.sys'; |
| 223 |
FLUSH PRIVILEGES; |