| 1 |
install plugin three_attempts soname 'dialog_examples.so'; |
| 2 |
create user test_dialog identified via three_attempts using 'SECRET'; |
| 3 |
GRANT SELECT ON test.* TO test_dialog; |
| 4 |
# |
| 5 |
# -pSECRET is picked up, no questions asked. |
| 6 |
# |
| 7 |
select user(), current_user(); |
| 8 |
user() current_user() |
| 9 |
test_dialog@localhost test_dialog@% |
| 10 |
# |
| 11 |
# without -p. up to three questions are asked on the stdin. |
| 12 |
# athentication is successful, the correct pasword is on the third line |
| 13 |
# |
| 14 |
Password, please: *** |
| 15 |
Password, please: **** |
| 16 |
Password, please: ****** |
| 17 |
select user(), current_user(); |
| 18 |
user() current_user() |
| 19 |
test_dialog@localhost test_dialog@% |
| 20 |
# |
| 21 |
# athentication is unsuccessful, first three lines are all wrong |
| 22 |
# |
| 23 |
Password, please: *** |
| 24 |
Password, please: **** |
| 25 |
Password, please: ***** |
| 26 |
drop user test_dialog; |
| 27 |
uninstall plugin three_attempts; |