0

How do you change the default location of the log_error file? If you point it to a new path, will it automatically move the existing file? Or will it create a new file, and the original file can be deleted? Software is installed on Windows.

Also, how do you change the default location of the innodb log files?

0

A). To change Mysql innodb_log file to a new location.

 1. Change my.cnf settings for innodb_log file or innodb_fast_shutdown=0 
   (so it does full flush of log files from buffer).

 2. Stop mysql.

 3. Change innodb_log_group_home_dir = /mysql/new_location/ in my.cnf.

 4. Start Mysql, it should be up now. 

B). To change Mysql log_error file to a new location.

 1. Create a new file for log_error file OS level. 
     - copy nul > /mysql/NEW_LOCATION/mysql_error
     - Give mysql permission to /mysql/NEW_LOCATION/mysql_error to read and write.

 2. Change my.cnf log_error = /mysql/NEW_LOCATION/mysql_error 

 3. Stop Mysql.

 4. Start Mysql.

You may do A and B in one shot, I will let you do organize which ever way you wanted.

1
  • Some of that is the wrong syntax for Windows. – Rick James Jun 4 '17 at 6:00
0

Some file are easy to move, some are not. And the mechanisms have changed in subsequent versions. 5.1 is so antique, that I do not have ready access to 5.1. Can you provide the current names of the log(s) you want to move? Also run this to see what settings are available:

SHOW VARIABLES LIKE '%file%';
SHOW VARIABLES LIKE '%dir%';

What version of Windows? In older versions, you could move a file and build a "Junction" (aka "soft link" to it). Newer versions have a better mechanism for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.