Tech Tip: How do I change the MySql tmp directory in NFA to a different directory?

Document created by Christopher_Walsh Employee on Mar 10, 2015
Version 1Show Document
  • View in full screen mode

Summary:

While administering your NFA server you may notice files like #sql_1f7c_0.MYI in your C:\Windows\Temp\ directory on Windows or /tmp on Linux and may want to move these to another directory.

On a NFA Harvester/DSA there are two Mysql services, one that runs on port 3308, 'NetQos Mysql51' or 'CA MySql'(in NFA 9.3), which is for your device list and configuration data, and one that runs on port 3307, 'NetQos NQMysql51' service,  which is where the data for reports is pulled. 

The 3308 instance on Windows already creates its tmp files in the <Install Directory>\CA\NFA\Mysql51\tmp or <Install Directory>\CA\NFA\Mysql\tmp (in NFA 9.3)

The 3307 instance (and 3308 instance on Linux) however will use either the C:\Windows\Temp\ directory on Windows or /tmp  directory on Linux for its tmp files.

When large reports are run these files can grow large, and you may want to move the Mysql tmpdir to another directory or drive.

The procedure below will explain how to move the mysql tmp files to a new directory.

 

Solution:

Windows:

1. RDP to the Harvester/DSA and find the \<Install Directory>\NFA\Netflow\bin\netqosmy.ini file

2. Edit the file and add the line below in the [mysqld] section of the file using the path where you would prefer the files be moved to:

tmpdir=E:/CA/NFA/MySql/tmp2

3. Save the file and recycle the 'Netqos NQMysql51' directory.

 

Linux:

1.  SSH to the Harvester and locate the two files below:

/opt/CA/NFA/NetFlow/my.cnf

/opt/CA/NFA/Mysql/my.cnf

2.  Edit the file in vi or any text editor and add the line below in the [mysqld] section of the files using the path of where you would like to have the files move to:

tmpdir=/opt/CA/NFA/MySql/tmp

 

3.  Save the two files and recycle both MySql services by running the commands below:

/etc/init.d/mysql restart

/etc/init.d/nfa_mysqlCSE restart

Attachments

    Outcomes