| 1 |
# |
| 2 |
## Remove MySQL Server accounts that use different authentication |
| 3 |
## plugins. |
| 4 |
# |
| 5 |
# Usage: |
| 6 |
# |
| 7 |
# [--let $user_native=user_name] |
| 8 |
# [--let $user_sha256=user_name] |
| 9 |
# [--let $user_cache2=user_name] |
| 10 |
# |
| 11 |
# [--let $host_native=host_name_or_ip] |
| 12 |
# [--let $host_sha256=host_name_or_ip] |
| 13 |
# [--let $host_cache2=host_name_or_ip] |
| 14 |
# |
| 15 |
# --source ../include/remove_mysql_accounts_for_xplugin_tests.h |
| 16 |
# |
| 17 |
# Example: |
| 18 |
# --source ../include/create_mysql_accounts_for_xplugin_tests.h |
| 19 |
# . |
| 20 |
# . Test case |
| 21 |
# . |
| 22 |
# # $user_* and $host_* variables were set by |
| 23 |
# # create_mysql_accounts_for_xplugin_tests.h. There is no need |
| 24 |
# # to set them directly. |
| 25 |
# --source ../include/remove_mysql_accounts_for_xplugin_tests.h |
| 26 |
# |
| 27 |
|
| 28 |
# |
| 29 |
## Check user names |
| 30 |
# |
| 31 |
|
| 32 |
if ($user_native == "") |
| 33 |
{ |
| 34 |
--die Required variable not set. |
| 35 |
} |
| 36 |
|
| 37 |
if ($user_sha256 == "") |
| 38 |
{ |
| 39 |
--die Required variable not set. |
| 40 |
} |
| 41 |
|
| 42 |
if ($user_cache2 == "") |
| 43 |
{ |
| 44 |
--die Required variable not set. |
| 45 |
} |
| 46 |
|
| 47 |
# |
| 48 |
## Check user hosts |
| 49 |
# |
| 50 |
|
| 51 |
if ($host_native == "") |
| 52 |
{ |
| 53 |
--die Required variable not set. |
| 54 |
} |
| 55 |
|
| 56 |
if ($host_sha256 == "") |
| 57 |
{ |
| 58 |
--die Required variable not set. |
| 59 |
} |
| 60 |
|
| 61 |
if ($host_cache2 == "") |
| 62 |
{ |
| 63 |
--die Required variable not set. |
| 64 |
} |
| 65 |
|
| 66 |
--eval DROP USER $user_native@$host_native |
| 67 |
--eval DROP USER $user_sha256@$host_sha256 |
| 68 |
--eval DROP USER $user_cache2@$host_cache2 |
| 69 |
|
| 70 |
--let $user_native= |
| 71 |
--let $user_sha256= |
| 72 |
--let $user_cache2= |
| 73 |
|
| 74 |
--let $host_native= |
| 75 |
--let $host_sha256= |
| 76 |
--let $host_cache2= |
| 77 |
|
| 78 |
--let $pass_native= |
| 79 |
--let $pass_sha256= |
| 80 |
--let $pass_cache2= |