Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A bug introduced in an older version of License Statistics can result in the embedded database index being prematurely exhausted if License Statistics is restarted too often. In such cases, there will be a problem updating the UsersCount table and you will see one or both of the following MySQL errors in the License Statistics log:

...

  1. Shut down License Statistics.

  2. From a command line, navigate to the License Statistics installation directory, and then to mysql_x86 for 32-bit databases or mysql_x64 for 64-bit databases.

  3. Start the MySQL server by running mysql_start.bat for Windows or mysql_start.sh for Linux. (Make sure mysqld process/daemon is running.)

  4. Connect to the License Statistics database server using the following command:
    For Windows: mysql -uroot -hlocalhost -Dxformation_licstat --protocol=TCP
    For Linux: ./mysql -uroot -hlocalhost -Dxformation_licstat --socket=data/mysql.sock --protocol=TCP 


  5. Pick the database name (you can check it in xflicstat.cfg file, default name is xformation_licstat):
    > USE xformation_licstat;


  6. Backup your data for the UsersCount table using the following SQL command:
    > SELECT Date, Total, DailyUsers, Hosts, DenialUsers INTO OUTFILE 'userscount.dump' FROM UsersCount;
     
  7. After successful backup, truncate the data and reset the index:
    > TRUNCATE UsersCount;

    > ALTER TABLE UsersCount AUTO_INCREMENT = 1;


  8. Restore the data:
    > LOAD DATA INFILE 'userscount.dump' INTO TABLE UsersCount (Date, Total, DailyUsers, Hosts, DenialUsers);

  9. Stop MySQL by running mysql_stop.bat/mysql_stop.sh

  10. Start License Statistics.

...