Debian Codegraph @

mysql-test/suite/auth_sec/include/skip_grant_protocols.inc

raw
1 ## Starts the server from the new datadir created at $MYSQL_TMP_DIR/datadir1,
2 ## and creates a new user with non-default plugin type.
3 ## Caller must cleanup the newly created datadir
4
5 --echo
6 --echo # Set different paths for --datadir
7 let $MYSQLD_DATADIR1 = $MYSQL_TMP_DIR/datadir1/data;
8
9 --echo
10 --echo # Create custom datadir path
11 --mkdir $MYSQL_TMP_DIR/datadir1
12
13 let BOOTSTRAP_SQL=$MYSQL_TMP_DIR/boot.sql;
14 let $start_page_size=`SELECT variable_value FROM performance_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'`;
15 #Create bootstrap file
16 --write_file $BOOTSTRAP_SQL
17 CREATE DATABASE test;
18 EOF
19
20 let NEW_CMD = $MYSQLD --no-defaults --initialize-insecure --datadir=$MYSQLD_DATADIR1 --init-file=$BOOTSTRAP_SQL</dev/null>>$MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 --innodb-page-size=$start_page_size;
21
22 --echo
23 --echo # Run the bootstrap command to create a new datadir
24 --exec $NEW_CMD
25
26 --echo
27 --echo # Start the DB server with the new datadir
28 --replace_result $MYSQLD_DATADIR1 MYSQLD_DATADIR1
29 --let $restart_parameters="restart: --datadir=$MYSQLD_DATADIR1"
30 --source include/restart_mysqld.inc
31
32 SELECT current_user;
33 SELECT user, plugin FROM mysql.user;
34
35 --echo
36 --echo # Set the password for the root user
37 SET PASSWORD = 'passwd';
38
39 --echo
40 --echo # Create a new user with non-default plugin
41 CREATE USER 'native_user' IDENTIFIED WITH 'mysql_native_password' BY 'passwd';
42 --echo
43
44 --remove_file $BOOTSTRAP_SQL