109 lines
3.3 KiB
Plaintext
109 lines
3.3 KiB
Plaintext
# Save the count of columns in mysql
|
|
# shut server down
|
|
# Server is down
|
|
#
|
|
# Try --initialize
|
|
#
|
|
# Run the server with --initialize
|
|
extract the root password
|
|
password found
|
|
# Restart the server against DDIR
|
|
# connect as root
|
|
# must fail due to password expiration
|
|
SELECT 1;
|
|
ERROR HY000: You must reset your password using ALTER USER statement before executing this statement.
|
|
# reset the password
|
|
SET PASSWORD='';
|
|
# Check the count of columns in mysql
|
|
# check the user account
|
|
SELECT user, host, plugin, LENGTH(authentication_string)
|
|
FROM mysql.user ORDER by user;
|
|
user host plugin LENGTH(authentication_string)
|
|
mysql.infoschema localhost caching_sha2_password 70
|
|
mysql.session localhost caching_sha2_password 70
|
|
mysql.sys localhost caching_sha2_password 70
|
|
root localhost caching_sha2_password 0
|
|
# Check the sys schema exists with the right object counts
|
|
#
|
|
# If this value differs, also update SYS_PROCEDURE_COUNT within ./client/upgrade/program.cc
|
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA = 'sys' AND ROUTINE_TYPE = 'PROCEDURE';
|
|
COUNT(*)
|
|
26
|
|
# If this value differs, also update SYS_FUNCTION_COUNT within ./client/upgrade/program.cc
|
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA = 'sys' AND ROUTINE_TYPE = 'FUNCTION';
|
|
COUNT(*)
|
|
22
|
|
# If this value differs, also update SYS_TABLE_COUNT within ./client/upgrade/program.cc
|
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'sys' AND TABLE_TYPE = 'BASE TABLE';
|
|
COUNT(*)
|
|
1
|
|
# If this value differs, also update SYS_VIEW_COUNT within ./client/upgrade/program.cc
|
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'sys' AND TABLE_TYPE = 'VIEW';
|
|
COUNT(*)
|
|
100
|
|
# If this value differs, also update SYS_TRIGGER_COUNT within ./client/upgrade/program.cc
|
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA = 'sys';
|
|
COUNT(*)
|
|
2
|
|
CREATE DATABASE test;
|
|
# shut server down
|
|
# Server is down
|
|
# close the test connection
|
|
# remove the password file
|
|
# delete mysqld log
|
|
# delete datadir
|
|
#
|
|
# Try --initialize-insecure --init-file
|
|
#
|
|
# create bootstrap file
|
|
# Run the server with --initialize-insecure --init-file
|
|
# Restart the server against DDIR
|
|
# connect as root
|
|
# must pass: no password expiration
|
|
SELECT 1;
|
|
1
|
|
1
|
|
# Check the count of columns in mysql
|
|
# Take out the extra t1 column
|
|
# check the user account
|
|
SELECT user, host, plugin, LENGTH(authentication_string)
|
|
FROM mysql.user ORDER BY user;
|
|
user host plugin LENGTH(authentication_string)
|
|
mysql.infoschema localhost caching_sha2_password 70
|
|
mysql.session localhost caching_sha2_password 70
|
|
mysql.sys localhost caching_sha2_password 70
|
|
root localhost caching_sha2_password 0
|
|
# check the result of running --init-file
|
|
SELECT a FROM t1 ORDER BY a;
|
|
a
|
|
1
|
|
2
|
|
# shut server down
|
|
# Server is down
|
|
# close the test connection
|
|
# delete mysqld log
|
|
# delete bootstrap file
|
|
# delete datadir
|
|
#
|
|
# Try --initialize-insecure --init-file=empty_file for error handling
|
|
#
|
|
# Run the server with --initialize-insecure --init-file=empty
|
|
# delete mysqld log
|
|
# delete datadir
|
|
#
|
|
# Try --initialize-insecure --init-file=relative_path for error handling
|
|
#
|
|
# Run the server with --initialize-insecure --init-file=haha.sql
|
|
# delete mysqld log
|
|
# delete datadir
|
|
#
|
|
# Bug#22777039 - MYSQLD --INITIALIZE DOES NOT SUPPORT THE KEYRING_FILE_DATA OPTION
|
|
#
|
|
# delete mysqld log
|
|
# delete temp keyring file
|
|
# delete datadir
|
|
#
|
|
# Cleanup
|
|
#
|
|
# Restarting the server
|