# 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 # # Bug#29584642 DATABASE INITIALISATION FAILURE WITH INNODB_DEFAULT_ROW_FORMAT=REDUNDANT # # The database initialization would fail without the fix. # delete mysqld log # delete datadir # # Bug#29780434 MYSQLD --INITIALIZE FAILS IF LOST+FOUND FROM FILESYSTEM IS IN DATADIR # # Create the data directory and subdirectories. # Add a sub-directory in it with a name that is not ignored. # Add a sub-directory in it with a name that is ignored. # Add a "hidden" sub-directory, starting with '.'. # Run the server with --initialize. Should fail due to 'subdir'. # Remove the subdirectory which is not accepted, and start the server with --initialize again. # Remove data dir and log file. # # Cleanup # # Restarting the server