Repair program errors from command prompt

Tekla PowerFab
Upraveno: 13 Bře 2023
2024i
Tekla PowerFab Tekla PowerFab GO

Repair program errors from command prompt

Occasionally, program errors need to repaired from outside of Tekla PowerFab. Administrators can use the command prompt on the server computer to find and repair errors in Tekla PowerFab.

When the commands presented here are executed, the program information is checked against the MySQL database, and any corrupt files are repaired.

Note: To repair errors, the administrator must execute the commands on the server computer. The commands do not work on other workstations.

Prerequisites

Before performing the repair steps, you need to have the following information available:

  • The directory that MySQL is installed to. By default this is installed at C:\mysql\.

    The installation may have been directed to a different location. You can check this in the Path column and MySQL Path row in MySQL Service Manager.

  • The port number for the the database you want to check.

    By default the Tekla PowerFab database runs on port 3306, but it can be changed. You can check this in the Port column and Port row in MySQL Service Manager.

  • The admin password for the Tekla PowerFab database.

By default, MySQL Service Manager is installed at C:\Program Files (x86)\Tekla\Tekla PowerFab\MySQL.Service.Manager.exe. The installation may have been directed to a different location.

The admin password should have been changed by someone at your organization. Tekla/Trimble does not have a way to discover this password. To reset the admin password, contact your local support.

Repair the database from command prompt

  1. Open a Command Prompt instance.
  2. To change the directory to the MySQL bin directory, type

    cd [path]

    Replace [path] with the path to the MySQL bin directory.

  3. In the MySQL bin directory, run the following command:
    mysqlcheck -u admin -p --auto-repair --check --all-databases --port=[port]

    Replace [port] with the port that the MySQL database is running on.

    Note: You can exclude --port= if you are using the default port 3306.
  4. When you are prompted to Enter Password:, type in the admin password and press Enter.
    The mysqlcheck command runs the Check/Repair on the database.
When the mysqlcheck command has completed, you can either type exit and press Enter to close the command prompt session, or just close the window.

Example: MySQL is in the default location and the database is on the default port (3306)

  1. Open a Command Prompt instance.
  2. To change the directory to the MySQL bin directory, type

    cd C:\mysql\bin

  3. In the MySQL bin directory, run the following command:
    mysqlcheck -u admin -p --auto-repair --check --all-databases
  4. When you are prompted to Enter Password:, type in the admin password and press Enter.
When the mysqlcheck command has completed, you can either type exit and press Enter to close the command prompt session, or just close the window.

Example: MySQL is in the default location and the database is on port 3220

  1. Open a Command Prompt instance.
  2. To change the directory to the MySQL bin directory, type

    cd C:\mysql\bin

  3. In the MySQL bin directory, run the following command:
    mysqlcheck -u admin -p --auto-repair --check --all-databases --port=3220
  4. When you are prompted to Enter Password:, type in the admin password and press Enter.
When the mysqlcheck command has completed, you can either type exit and press Enter to close the command prompt session, or just close the window.

Example: MySQL is on another drive or location and the database is on port 3220

  1. Open a Command Prompt instance.
  2. To change the directory to the MySQL bin directory, type

    cd D:\mysql_5_7_29\bin

  3. In the MySQL bin directory, run the following command:
    mysqlcheck -u admin -p --auto-repair --check --all-databases --port=3220
  4. When you are prompted to Enter Password:, type in the admin password and press Enter.
When the mysqlcheck command has completed, you can either type exit and press Enter to close the command prompt session, or just close the window.
Bylo to užitečné?
Předchozí
Další