| 1 |
## This is test file for connection authentication using mysqlx. |
| 2 |
## |
| 3 |
|
| 4 |
#TODO After implementing Names Pipes this test should be merged back to connection_skip_networking.test |
| 5 |
|
| 6 |
--source include/windows.inc |
| 7 |
--source include/xplugin_preamble.inc |
| 8 |
|
| 9 |
create user nonblank@localhost identified by 'nonblank'; |
| 10 |
|
| 11 |
--write_file $MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp |
| 12 |
-->sql |
| 13 |
select user(),current_user(),@@bind_address; |
| 14 |
-->endsql |
| 15 |
EOF |
| 16 |
|
| 17 |
--echo Test starts here |
| 18 |
--disable_query_log |
| 19 |
--disable_result_log |
| 20 |
|
| 21 |
connect (master,localhost,root,,,,,PIPE); |
| 22 |
let $restart_parameters = restart: --enable-named-pipe --skip-networking; |
| 23 |
let $restart_parameters_restore = --enable-named-pipe; |
| 24 |
|
| 25 |
--replace_regex /restart: .+$XPLUGIN_SOCKE/restart: --skip-networking/ |
| 26 |
--source ../include/restart_mysqld_pipe.inc |
| 27 |
--disable_result_log |
| 28 |
--echo Following commands should fail |
| 29 |
--replace_regex /ERROR: .+:[0-9]+/ERROR: Connection refused connecting to localhost:PORT/ |
| 30 |
--error 1 |
| 31 |
--exec $MYSQLXTEST -u root --password='' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1 |
| 32 |
|
| 33 |
--echo try login using mysqlx protocol when server started with skip-networking options and mysqlx loaded with non super user |
| 34 |
--replace_regex /ERROR: .+:[0-9]+/ERROR: Connection refused connecting to localhost:PORT/ |
| 35 |
--error 1 |
| 36 |
--exec $MYSQLXTEST -u nonblank --password='nonblank' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1 |
| 37 |
|
| 38 |
call mtr.add_suppression("Plugin mysqlx reported: .All I/O interfaces are disabled, X Protocol won't be accessible"); |
| 39 |
|
| 40 |
--disable_query_log |
| 41 |
let $restart_parameters = restart: $restart_parameters_restore; |
| 42 |
--source ../include/restart_mysqld_pipe.inc |
| 43 |
--enable_query_log |
| 44 |
--enable_result_log |
| 45 |
|
| 46 |
## Cleanup |
| 47 |
drop user nonblank@localhost; |
| 48 |
--remove_file $MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp |