Import Database Logger's schema to the MySQL database, and set up the proper access permissions.
The Database Logger is a feature that record all the server's Aspera transactions to a MySQL
database. Follow the steps below to set it up.
Important:
To migrate the database from Version {X} to the latest
version, please refer to the last step in the instructions below.
-
Prepare the MySQL Database Server
The Database Logger supports MySQL Server 5 and above. Prepare a system with MySQL installed and configured. The latest MySQL software download can be found at http://dev.mysql.com/downloads/.
-
Create the database
Locate the Database Logger schema file in the following location:
/opt/aspera/var/create_logger_database.sql
Copy the file to the computer that runs the MySQL Server, and use the following commands to import this file into the database. This example uses the following settings:
Item |
Value |
MySQL login |
root |
Database Logger schema file location: |
/temp/create_logger_database.sql |
$ mysql -u root -p < /temp/create_logger_database.sql
$ mysql -u root -p aspera_console
mysql> show tables;
When finished, the database aspera_console will be imported to the MySQL Server. You should see the tables of this database.
-
Set up the MySQL user for Database Logger
A database user with proper permissions is required for Database Logger. In the following example, the user account is created with the setup:
Item |
Value |
MySQL login |
logger |
Password |
logger-password |
IP address of remote machine |
10.0.0.5 |
1> CREATE USER 'logger'@'10.0.0.5' IDENTIFIED by 'logger-password';
2> GRANT SELECT, INSERT, UPDATE ON aspera_console.fasp_files TO 'logger'@'10.0.0.5';
3> GRANT SELECT, INSERT, UPDATE ON aspera_console.fasp_sessions TO 'logger'@'10.0.0.5';
4> GRANT SELECT, INSERT, UPDATE ON aspera_console.fasp_nodes TO 'logger'@'10.0.0.5';
5> GRANT INSERT ON aspera_console.fasp_rates TO 'logger'@'10.0.0.5';
6> FLUSH PRIVILEGES;
-
Modify MySQL Settings (Only if MySQL server is on Windows)
If you are running the database on a Windows machine, open the MySQL config file, for example:
C:\Program Files\MySQL\MySQL Server (Version)\my.ini
Find the line that says [mysqld], and add the line immediately under it:
skip-name-resolve
-
(For database migrations only) Use the *.sql scripts to migrate the
database.
To migrate your database to the most current version, use the scripts
provided in the following directory:
/opt/aspera/var/
The command to execute the scripts is shown below, however, they
MUST be executed in a specific order.
$ mysql -u root -p < migrate_logger_database_VER1_to_VER2.sql
The REQUIRED order is displayed below.
$ mysql -u root -p < "migrate_logger_database_7715_to_11340.sql"
$ mysql -u root -p < "migrate_logger_database_11340_to_34300.sql"
$ mysql -u root -p < "migrate_logger_database_34300_to_60784.sql"