Debian Codegraph @

mysql-test/suite/auth_sec/t/mysql_native_plugin.test

raw
1 ###############################################################################
2 # #
3 # Authorization and authentication using the MYSQL_NATIVE_PASSWORD pligin at #
4 # server and client side #
5 # #
6 # #
7 # #
8 # Creation Date: 2012-12-10 #
9 # Author : Tanjot Singh Uppal #
10 # #
11 # #
12 # Description:Test Cases of authenticating the hashed password using the #
13 # mysql_native_password plugin at the server side as well as the client side #
14 # #
15 # #
16 ###############################################################################
17
18 --source include/mysql_upgrade_preparation.inc
19
20 # This test will intentionally generate errors in the server error log
21 # when a broken password is inserted into the mysql.user table.
22 # The below suppression is to clear those errors.
23
24
25 --disable_query_log
26 call mtr.add_suppression(".*Password salt for user.*");
27 --enable_query_log
28
29 --echo
30 --echo
31 --echo ===========================================================================================================================================
32 --echo Checking the password authentication using the mysql_native_password plugin at the client and mysql_native_password plugin at the server side
33 --echo ===========================================================================================================================================
34 --echo
35
36 # Checking the password authentication with mysql_native_password plugin
37 # Creating 2 users and encrypting the server side password with the mysql_native_password plugin
38
39 CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
40
41 CREATE USER 'Tanjotuser2'@'127.0.0.1' IDENTIFIED WITH 'mysql_native_password';
42
43 # Verifying the server side plugin used to be mysql_native_password
44
45 select (select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password';
46 --echo 1 Expected
47
48 select (select plugin from mysql.user where User='Tanjotuser2' and Host='127.0.0.1')='mysql_native_password';
49 --echo 1 Expected
50
51 # Verifying the client connection using the same mysql_native_password plugin and NULL password
52
53 --replace_result "NO" "" "YES" ""
54 connect(con1,localhost,Tanjotuser1,,,);
55 --replace_result "NO" "" "YES" ""
56 connect(con2,127.0.0.1,Tanjotuser2,,,);
57
58 # Verifying the client connection using the same mysql_native_password plugin and junk password
59
60 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
61 --replace_result "NO" "" "YES" ""
62 --disable_query_log
63 --error ER_ACCESS_DENIED_ERROR
64 connect(con3,localhost,Tanjotuser1," ",,);
65 --enable_query_log
66
67 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
68 --replace_result "NO" "" "YES" ""
69 --disable_query_log
70 --error ER_ACCESS_DENIED_ERROR
71 connect(con4,127.0.0.1,Tanjotuser2," ",,);
72 --enable_query_log
73
74 # setting the password for the 2 users using the mysql_native_password plugin
75
76 connection default;
77
78
79 SET PASSWORD FOR 'Tanjotuser1'@'localhost'='abc';
80 SET PASSWORD FOR 'Tanjotuser2'@'127.0.0.1'='abc';
81
82 # Verifying the client connection using the mysql_native_password plugin and NULL password
83
84 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
85 --replace_result "NO" "" "YES" ""
86 --disable_query_log
87 --error ER_ACCESS_DENIED_ERROR
88 connect(con5,localhost,Tanjotuser1,,,);
89 --enable_query_log
90
91 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
92 --replace_result "NO" "" "YES" ""
93 --disable_query_log
94 --error ER_ACCESS_DENIED_ERROR
95 connect(con6,127.0.0.1,Tanjotuser2,,,);
96 --enable_query_log
97
98 # Verifying the client connection using the mysql_native_password plugin and junk password
99
100 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
101 --replace_result "NO" "" "YES" ""
102 --disable_query_log
103 --error ER_ACCESS_DENIED_ERROR
104 connect(con7,localhost,Tanjotuser1," ",,);
105 --enable_query_log
106
107 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
108 --replace_result "NO" "" "YES" ""
109 --disable_query_log
110 --error ER_ACCESS_DENIED_ERROR
111 connect(con8,127.0.0.1,Tanjotuser2," ",,);
112 --enable_query_log
113
114
115 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
116 --replace_result "NO" "" "YES" ""
117 --disable_query_log
118 --error ER_ACCESS_DENIED_ERROR
119 connect(con9,localhost,Tanjotuser1,"%",,);
120 --enable_query_log
121
122 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
123 --replace_result "NO" "" "YES" ""
124 --disable_query_log
125 --error ER_ACCESS_DENIED_ERROR
126 connect(con10,127.0.0.1,Tanjotuser2,"%",,);
127 --enable_query_log
128
129
130 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
131 --replace_result "NO" "" "YES" ""
132 --disable_query_log
133 --error ER_ACCESS_DENIED_ERROR
134 connect(con11,localhost,Tanjotuser1,"_",,);
135 --enable_query_log
136
137 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
138 --replace_result "NO" "" "YES" ""
139 --disable_query_log
140 --error ER_ACCESS_DENIED_ERROR
141 connect(con12,127.0.0.1,Tanjotuser2,"_",,);
142 --enable_query_log
143
144 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
145 --replace_result "NO" "" "YES" ""
146 --disable_query_log
147 --error ER_ACCESS_DENIED_ERROR
148 connect(con13,localhost,Tanjotuser1,"0",,);
149 --enable_query_log
150
151 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
152 --replace_result "NO" "" "YES" ""
153 --disable_query_log
154 --error ER_ACCESS_DENIED_ERROR
155 connect(con14,127.0.0.1,Tanjotuser2,"0",,);
156 --enable_query_log
157
158 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
159 --replace_result "NO" "" "YES" ""
160 --disable_query_log
161 --error ER_ACCESS_DENIED_ERROR
162 connect(con15,localhost,Tanjotuser1,"^",,);
163 --enable_query_log
164
165 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
166 --replace_result "NO" "" "YES" ""
167 --disable_query_log
168 --error ER_ACCESS_DENIED_ERROR
169 connect(con16,127.0.0.1,Tanjotuser2,"^",,);
170 --enable_query_log
171
172 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
173 --replace_result "NO" "" "YES" ""
174 --disable_query_log
175 --error ER_ACCESS_DENIED_ERROR
176 connect(con17,localhost,Tanjotuser1,'\$',,);
177 --enable_query_log
178
179 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
180 --replace_result "NO" "" "YES" ""
181 --disable_query_log
182 --error ER_ACCESS_DENIED_ERROR
183 connect(con18,127.0.0.1,Tanjotuser2,'\$',,);
184 --enable_query_log
185
186
187 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
188 --replace_result "NO" "" "YES" ""
189 --disable_query_log
190 --error ER_ACCESS_DENIED_ERROR
191 connect(con19,localhost,Tanjotuser1,"&",,);
192 --enable_query_log
193
194 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
195 --replace_result "NO" "" "YES" ""
196 --disable_query_log
197 --error ER_ACCESS_DENIED_ERROR
198 connect(con20,127.0.0.1,Tanjotuser2,"&",,);
199 --enable_query_log
200
201
202 # Dropping the created users
203
204 connection default;
205
206 DROP USER 'Tanjotuser1'@'localhost';
207 DROP USER 'Tanjotuser2'@'127.0.0.1';
208
209 --echo
210 --echo
211 --echo ====================================================================================================
212 --echo checking the integrity of long password (more than 40 chars) using mysql_native_password plugin
213 --echo ====================================================================================================
214 --echo
215
216
217 # Checking the password authentication with mysql_native_password plugin
218 # Creating 2 users and encrypting the server side password with the mysql_native_password plugin
219
220 CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
221
222 CREATE USER 'Tanjotuser2'@'127.0.0.1' IDENTIFIED WITH 'mysql_native_password';
223
224 # setting the password for the 2 users using the mysql_native_password plugin
225
226 SET PASSWORD FOR 'Tanjotuser1'@'localhost'='$$$$$$$$$$^^^^^^^^^^&&&&&&&&&&**********((((((((((##########!!!!!!!!!!@@@@@@@@@@ @@@@@@@@@@__________';
227 SET PASSWORD FOR 'Tanjotuser2'@'127.0.0.1'='$$$$$$$$$$^^^^^^^^^^&&&&&&&&&&**********((((((((((##########!!!!!!!!!!@@@@@@@@@@ @@@@@@@@@@__________';
228
229
230 # Verifying the client access denied passing null password
231
232 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
233 --replace_result "NO" "" "YES" ""
234 --disable_query_log
235 --error ER_ACCESS_DENIED_ERROR
236 connect(con39,localhost,Tanjotuser1," ",,);
237 --enable_query_log
238
239 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
240 --replace_result "NO" "" "YES" ""
241 --disable_query_log
242 --error ER_ACCESS_DENIED_ERROR
243 connect(con40,127.0.0.1,Tanjotuser2," ",,);
244 --enable_query_log
245 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
246 --replace_result "NO" "" "YES" ""
247 --disable_query_log
248 --error ER_ACCESS_DENIED_ERROR
249 connect(con41,localhost,Tanjotuser1,,,);
250 --enable_query_log
251
252 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
253 --replace_result "NO" "" "YES" ""
254 --disable_query_log
255 --error ER_ACCESS_DENIED_ERROR
256 connect(con42,127.0.0.1,Tanjotuser2,,,);
257 --enable_query_log
258
259 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
260 --replace_result "NO" "" "YES" ""
261 --disable_query_log
262 --error ER_ACCESS_DENIED_ERROR
263 connect(con43,localhost,Tanjotuser1,"@_",,);
264 --enable_query_log
265
266 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
267 --replace_result "NO" "" "YES" ""
268 --disable_query_log
269 --error ER_ACCESS_DENIED_ERROR
270 connect(con44,127.0.0.1,Tanjotuser2,"@_",,);
271 --enable_query_log
272
273 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
274 --replace_result "NO" "" "YES" ""
275 --disable_query_log
276 --error ER_ACCESS_DENIED_ERROR
277 connect(con45,localhost,Tanjotuser1,"$_",,);
278 --enable_query_log
279
280 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
281 --replace_result "NO" "" "YES" ""
282 --disable_query_log
283 --error ER_ACCESS_DENIED_ERROR
284 connect(con46,127.0.0.1,Tanjotuser2,"$_",,);
285 --enable_query_log
286
287
288 # Dropping the created users
289
290 connection default;
291
292 DROP USER 'Tanjotuser1'@'localhost';
293 DROP USER 'Tanjotuser2'@'127.0.0.1';
294
295 --echo
296 --echo
297 --echo ============================================================================================================================================
298 --echo Checking the password authentication using the mysql_native_password plugin at the client and sha256_password plugin at the server side
299 --echo ============================================================================================================================================
300 --echo
301
302 --echo # Restart server with default-authentication-plugin=sha256_password;
303
304 let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
305 --exec echo "wait" > $restart_file
306 --shutdown_server
307 --source include/wait_until_disconnected.inc
308 -- exec echo "restart:--default-authentication-plugin=sha256_password " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
309 -- enable_reconnect
310 -- source include/wait_until_connected_again.inc
311
312
313
314 # Checking the password authentication with mysql_native_password plugin
315 # Creating 2 users and encrypting the server side password with the mysql_native_password plugin
316
317 CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
318
319 CREATE USER 'Tanjotuser2'@'127.0.0.1' IDENTIFIED WITH 'mysql_native_password';
320
321 # Verifying the server side plugin used to be mysql_native_password
322
323 select (select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password';
324 --echo 1 Expected
325
326 select (select plugin from mysql.user where User='Tanjotuser2' and Host='127.0.0.1')='mysql_native_password';
327 --echo 1 Expected
328
329 # Verifying the client connection using the same mysql_native_password plugin and NULL password
330
331 --replace_result "NO" "" "YES" ""
332 connect(con89,localhost,Tanjotuser1,,,);
333 --replace_result "NO" "" "YES" ""
334 connect(con90,127.0.0.1,Tanjotuser2,,,);
335
336 # Verifying the client connection using the same mysql_native_password plugin and junk password
337
338 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
339 --replace_result "NO" "" "YES" ""
340 --disable_query_log
341 --error ER_ACCESS_DENIED_ERROR
342 connect(con91,localhost,Tanjotuser1," ",,);
343 --enable_query_log
344
345 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
346 --replace_result "NO" "" "YES" ""
347 --disable_query_log
348 --error ER_ACCESS_DENIED_ERROR
349 connect(con92,127.0.0.1,Tanjotuser2," ",,);
350 --enable_query_log
351
352 # setting the password for the 2 users using the mysql_native_password plugin
353
354 connection default;
355
356 SET PASSWORD FOR 'Tanjotuser1'@'localhost'='abc';
357 SET PASSWORD FOR 'Tanjotuser2'@'127.0.0.1'='abc';
358
359 # Verifying the client connection using the same mysql_native_password plugin and NULL password
360
361 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
362 --replace_result "NO" "" "YES" ""
363 --disable_query_log
364 --error ER_ACCESS_DENIED_ERROR
365 connect(con93,localhost,Tanjotuser1,,,);
366 --enable_query_log
367
368 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
369 --replace_result "NO" "" "YES" ""
370 --disable_query_log
371 --error ER_ACCESS_DENIED_ERROR
372 connect(con94,127.0.0.1,Tanjotuser2,,,);
373 --enable_query_log
374
375 # Verifying the client connection using the same mysql_native_password plugin and junk password
376
377 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
378 --replace_result "NO" "" "YES" ""
379 --disable_query_log
380 --error ER_ACCESS_DENIED_ERROR
381 connect(con95,localhost,Tanjotuser1," ",,);
382 --enable_query_log
383
384 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
385 --replace_result "NO" "" "YES" ""
386 --disable_query_log
387 --error ER_ACCESS_DENIED_ERROR
388 connect(con96,127.0.0.1,Tanjotuser2," ",,);
389 --enable_query_log
390
391 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
392 --replace_result "NO" "" "YES" ""
393 --disable_query_log
394 --error ER_ACCESS_DENIED_ERROR
395 connect(con97,localhost,Tanjotuser1,"%",,);
396 --enable_query_log
397
398 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
399 --replace_result "NO" "" "YES" ""
400 --disable_query_log
401 --error ER_ACCESS_DENIED_ERROR
402 connect(con98,127.0.0.1,Tanjotuser2,"%",,);
403 --enable_query_log
404
405 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
406 --replace_result "NO" "" "YES" ""
407 --disable_query_log
408 --error ER_ACCESS_DENIED_ERROR
409 connect(con99,localhost,Tanjotuser1,"_",,);
410 --enable_query_log
411
412 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
413 --replace_result "NO" "" "YES" ""
414 --disable_query_log
415 --error ER_ACCESS_DENIED_ERROR
416 connect(con100,127.0.0.1,Tanjotuser2,"_",,);
417 --enable_query_log
418
419 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
420 --replace_result "NO" "" "YES" ""
421 --disable_query_log
422 --error ER_ACCESS_DENIED_ERROR
423 connect(con101,localhost,Tanjotuser1,"0",,);
424 --enable_query_log
425
426 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
427 --replace_result "NO" "" "YES" ""
428 --disable_query_log
429 --error ER_ACCESS_DENIED_ERROR
430 connect(con102,127.0.0.1,Tanjotuser2,"0",,);
431 --enable_query_log
432
433 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
434 --replace_result "NO" "" "YES" ""
435 --disable_query_log
436 --error ER_ACCESS_DENIED_ERROR
437 connect(con103,localhost,Tanjotuser1,"^",,);
438 --enable_query_log
439
440 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
441 --replace_result "NO" "" "YES" ""
442 --disable_query_log
443 --error ER_ACCESS_DENIED_ERROR
444 connect(con104,127.0.0.1,Tanjotuser2,"^",,);
445 --enable_query_log
446
447 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
448 --replace_result "NO" "" "YES" ""
449 --disable_query_log
450 --error ER_ACCESS_DENIED_ERROR
451 connect(con105,localhost,Tanjotuser1,"\$",,);
452 --enable_query_log
453
454 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
455 --replace_result "NO" "" "YES" ""
456 --disable_query_log
457 --error ER_ACCESS_DENIED_ERROR
458 connect(con106,127.0.0.1,Tanjotuser2,"\$",,);
459 --enable_query_log
460
461 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
462 --replace_result "NO" "" "YES" ""
463 --disable_query_log
464 --error ER_ACCESS_DENIED_ERROR
465 connect(con107,localhost,Tanjotuser1,"&",,);
466 --enable_query_log
467
468 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
469 --replace_result "NO" "" "YES" ""
470 --disable_query_log
471 --error ER_ACCESS_DENIED_ERROR
472 connect(con108,127.0.0.1,Tanjotuser2,"&",,);
473 --enable_query_log
474
475 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
476 --replace_result "NO" "" "YES" ""
477 --disable_query_log
478 --error ER_ACCESS_DENIED_ERROR
479 connect(con117,localhost,Tanjotuser1,"0abc",,);
480 --enable_query_log
481
482 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
483 --replace_result "NO" "" "YES" ""
484 --disable_query_log
485 --error ER_ACCESS_DENIED_ERROR
486 connect(con118,127.0.0.1,Tanjotuser2,"0abc",,);
487 --enable_query_log
488
489 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
490 --replace_result "NO" "" "YES" ""
491 --disable_query_log
492 --error ER_ACCESS_DENIED_ERROR
493 connect(con119,localhost,Tanjotuser1,"abc0",,);
494 --enable_query_log
495
496 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
497 --replace_result "NO" "" "YES" ""
498 --disable_query_log
499 --error ER_ACCESS_DENIED_ERROR
500 connect(con120,127.0.0.1,Tanjotuser2,"abc0",,);
501 --enable_query_log
502
503 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
504 --replace_result "NO" "" "YES" ""
505 --disable_query_log
506 --error ER_ACCESS_DENIED_ERROR
507 connect(con121,localhost,Tanjotuser1,"@abc",,);
508 --enable_query_log
509
510 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
511 --replace_result "NO" "" "YES" ""
512 --disable_query_log
513 --error ER_ACCESS_DENIED_ERROR
514 connect(con122,127.0.0.1,Tanjotuser2,"@abc",,);
515 --enable_query_log
516
517 # Dropping the created users
518
519 connection default;
520
521 DROP USER 'Tanjotuser1'@'localhost';
522 DROP USER 'Tanjotuser2'@'127.0.0.1';
523
524 --echo
525 --echo
526 --echo ====================================================================================================
527 --echo checking the integrity of long password (more than 40 chars) using mysql_native_password plugin
528 --echo ====================================================================================================
529 --echo
530
531
532 # Checking the password authentication with mysql_native_password plugin
533 # Creating 2 users and encrypting the server side password with the mysql_native_password plugin
534
535 CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
536
537 CREATE USER 'Tanjotuser2'@'127.0.0.1' IDENTIFIED WITH 'mysql_native_password';
538
539 # setting the password for the 2 users using the mysql_native_password plugin
540
541 SET PASSWORD FOR 'Tanjotuser1'@'localhost'='$$$$$$$$$$^^^^^^^^^^&&&&&&&&&&**********((((((((((##########!!!!!!!!!!@@@@@@@@@@ @@@@@@@@@@__________';
542 SET PASSWORD FOR 'Tanjotuser2'@'127.0.0.1'='$$$$$$$$$$^^^^^^^^^^&&&&&&&&&&**********((((((((((##########!!!!!!!!!!@@@@@@@@@@ @@@@@@@@@@__________';
543
544
545 connection default;
546
547 --disable_warnings
548 --replace_result "NO" "" "YES" ""
549 connect(con125,localhost,Tanjotuser1,"\$\$\$\$\$\$\$\$\$\$^^^^^^^^^^&&&&&&&&&&**********((((((((((##########!!!!!!!!!!@@@@@@@@@@ @@@@@@@@@@__________",,);
550 --replace_result "NO" "" "YES" ""
551 connect(con126,127.0.0.1,Tanjotuser2,"\$\$\$\$\$\$\$\$\$\$^^^^^^^^^^&&&&&&&&&&**********((((((((((##########!!!!!!!!!!@@@@@@@@@@ @@@@@@@@@@__________",,);
552 --enable_warnings
553
554 # Verifying the client access denied passing null password
555
556 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
557 --replace_result "NO" "" "YES" ""
558 --disable_query_log
559 --error ER_ACCESS_DENIED_ERROR
560 connect(con127,localhost,Tanjotuser1," ",,);
561 --enable_query_log
562
563 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
564 --replace_result "NO" "" "YES" ""
565 --disable_query_log
566 --error ER_ACCESS_DENIED_ERROR
567 connect(con128,127.0.0.1,Tanjotuser2," ",,);
568 --enable_query_log
569
570 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
571 --replace_result "NO" "" "YES" ""
572 --disable_query_log
573 --error ER_ACCESS_DENIED_ERROR
574 connect(con127,localhost,Tanjotuser1,,,);
575 --enable_query_log
576
577 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
578 --replace_result "NO" "" "YES" ""
579 --disable_query_log
580 --error ER_ACCESS_DENIED_ERROR
581 connect(con128,127.0.0.1,Tanjotuser2,,,);
582 --enable_query_log
583
584 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
585 --replace_result "NO" "" "YES" ""
586 --disable_query_log
587 --error ER_ACCESS_DENIED_ERROR
588 connect(con129,localhost,Tanjotuser1,"@_",,);
589 --enable_query_log
590
591 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
592 --replace_result "NO" "" "YES" ""
593 --disable_query_log
594 --error ER_ACCESS_DENIED_ERROR
595 connect(con130,127.0.0.1,Tanjotuser2,"@_",,);
596 --enable_query_log
597
598 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
599 --replace_result "NO" "" "YES" ""
600 --disable_query_log
601 --error ER_ACCESS_DENIED_ERROR
602 connect(con131,localhost,Tanjotuser1,"$_",,);
603 --enable_query_log
604
605 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
606 --replace_result "NO" "" "YES" ""
607 --disable_query_log
608 --error ER_ACCESS_DENIED_ERROR
609 connect(con132,127.0.0.1,Tanjotuser2,"$_",,);
610 --enable_query_log
611
612
613 # Dropping the created users
614
615 disconnect con1;
616 disconnect con2;
617 #disconnect con3;
618 #disconnect con4;
619 #disconnect con5;
620 #disconnect con6;
621 #disconnect con7;
622 #disconnect con8;
623 #disconnect con9;
624 #disconnect con10;
625 #disconnect con11;
626 #disconnect con12;
627 #disconnect con13;
628 #disconnect con14;
629 #disconnect con15;
630 #disconnect con16;
631 #disconnect con17;
632 #disconnect con18;
633 #disconnect con19;
634 #disconnect con20;
635 #disconnect con39;
636 #disconnect con40;
637 #disconnect con41;
638 #disconnect con42;
639 #disconnect con43;
640 #disconnect con44;
641 #disconnect con45;
642 #disconnect con46;
643 disconnect con89;
644 disconnect con90;
645 #disconnect con91;
646 #disconnect con92;
647 #disconnect con93;
648 #disconnect con94;
649 #disconnect con95;
650 #disconnect con96;
651 #disconnect con97;
652 #disconnect con98;
653 #disconnect con99;
654 #disconnect con100;
655 #disconnect con101;
656 #disconnect con102;
657 #disconnect con103;
658 #disconnect con104;
659 #disconnect con105;
660 #disconnect con106;
661 #disconnect con107;
662 #disconnect con108;
663 #disconnect con113;
664 #disconnect con114;
665 #disconnect con115;
666 #disconnect con116;
667 #disconnect con117;
668 #disconnect con118;
669 #disconnect con119;
670 #disconnect con120;
671 #disconnect con121;
672 #disconnect con122;
673 disconnect con125;
674 disconnect con126;
675 #disconnect con127;
676 #disconnect con128;
677 #disconnect con129;
678 #disconnect con130;
679 #disconnect con131;
680 #disconnect con132;
681
682
683 connection default;
684
685 DROP USER 'Tanjotuser1'@'localhost';
686 DROP USER 'Tanjotuser2'@'127.0.0.1';
687
688 # Restore default settings in opt file and clean up
689 --let $restart_parameters = restart:
690 --source include/restart_mysqld.inc