Back to top

How to reset your On-Premises server and web console password

Last updated April 14th, 2025

Environment

  • Knox E-FOTA On-Premises
  • MySQL database
  • Docker for Ubuntu
  • Podman for Red Hat Enterprise Linux

Overview

When using Knox E-FOTA On-Premises, you may need to reset your MySQL database server root password. Your MySQL credentials are required to reset your Knox E-FOTA On-Premises web console password.

How to reset your MySQL database server root password

Before resetting your MySQL root password, you must first edit the my.cnf file and restart the service.

  1. Open a new terminal.
  2. Enter vi /dfm/mysql/config/my.cnf to open my.cnf.
  3. In the file, add the line skip-grant-tables to the mysqld block.
  4. Save and exit the file.
  5. Enter dfm restart dfm-mysql in the terminal to restart the MySQL service.

Ubuntu

If your system uses Ubuntu, you can connect to MySQL with Docker to reset your root password:

  1. In the terminal, enter docker exec -it dfm-mysql mysql -uroot to connect to MySQL without a password.

  2. Enter the following lines in the terminal to change the root password to null:

    use mysql;
    UPDATE user SET authentication_string = null WHERE user = 'root'; 
    exit;
    
  3. Enter vi /dfm/mysql/config/my.cnf in the terminal to open my.cnf.

  4. In the file, remove the previously added skip-grant-tables line.

  5. Save and exit the file.

  6. Restart MySQL by entering the command dfm restart dfm-mysql.

  7. Connect to MySQL by entering the command docker exec -it dfm-mysql mysql -uroot.

  8. After resetting your MySQL root password, you can reset your E-FOTA On-Premises web console password to the default by entering the following lines into the terminal:

        use dfm_console_db;
        update tb_user set auth_code = '$2a$10$9f7Y/.D7/egyUdmLyowLHup3NplG/TI5q8lYMZ0Xg5psh.7Xur9wm' where user_id = 5;
    

Red Hat Enterprise Linux

Alternatively, if your system uses Red Hat Enterprise Linux, you can connect to MySQL with Podman to reset your root password:

  1. In the terminal, enter podman exec -it dfm-mysql mysql -uroot to connect to MySQL without a password.

  2. Enter the following lines in the terminal to change the root password to null:

    use mysql;
    UPDATE user SET authentication_string = null WHERE user = 'root'; 
    exit;
    
  3. Enter vi /dfm/mysql/config/my.cnf in the terminal to open my.cnf.

  4. Remove the previously added skip-grant-tables line.

  5. Save and exit the file.

  6. Restart MySQL by entering the command dfm restart dfm-mysql.

  7. Connect to MySQL by entering command podman exec -it dfm-mysql mysql -uroot.

  8. After resetting your MySQL root password, you can reset your E-FOTA On-Premises web console password to the default by entering the following lines into the terminal:

        use dfm_console_db;
        update tb_user set auth_code = '$2a$10$9f7Y/.D7/egyUdmLyowLHup3NplG/TI5q8lYMZ0Xg5psh.7Xur9wm' where user_id = 5;
    

You can now access the Knox-EFOTA On-Premises web console server with the default credentials and set your MySQL password using the installation guide.

Is this page helpful?