Modify the Controller Database

MYSQL versions <=5.7 have the Compact Row_Format. Therefore, you must modify the Controller database tables to change the Row_format to Dynamic before upgrading MYSQL to 8.0 version.

Note: Before you upgrade the Controller MYSQL to version 8.0, upgrade the Enterprise Console and the Controller.

Complete the following steps to modify the database table:

  1. Stop the Controller application server.
    cd ~<controller_home>/bin/
    ./controller.sh stop-appserver
  2. Run the following commands to create the SQL file that has ALTER commands.

    1. Navigate to the database bin directory.
      cd ~<controller_home>/db/bin/
    2. Createthe the Alter.sql file.
      ./mysql -N -uroot -p<database_root_user_password> --socket=~<MySql_Socket_Path> -e'SELECT CONCAT("ALTER TABLE ", tables.TABLE_SCHEMA, ".", tables.TABLE_NAME, " ROW_FORMAT=DYNAMIC;") FROM (SELECT TABLE_SCHEMA, TABLE_NAME, ROW_FORMAT FROM information_schema.TABLES WHERE ROW_FORMAT = "Compact") tables;' > Alter.sql
      Note: To fetch the MYSQL socket path, run this command:
      ~<MySql_Socket_Path> can be fetch from o/p of command -> ps -ef | grep mysqld
  3. Log in to the Controller database to run the ALTER commands.
    cd ~<controller-home>/bin/
    ./controller.sh login-db
    source Alter.sql
  4. Verify that the tables have Dynamics Row_format.
    SELECT TABLE_SCHEMA, TABLE_NAME, ROW_FORMAT FROM information_schema.TABLES WHERE ROW_FORMAT = 'Compact';
    If the output is NULL, the table has no Compact Row_Format.