Bug #71080 unknown variable 'log_bin_basename
Submitted: 4 Dec 2013 15:31 Modified: 5 Dec 2013 9:58
Reporter: Marcelo Altmann (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.6.15 OS:Linux
Assigned to: CPU Architecture:Any

[4 Dec 2013 15:31] Marcelo Altmann
Description:
When added the option log_bin_basename the server don't start, it throws an error:

2013-12-04 15:23:13 48858 [ERROR] /mysql/mysql/bin/mysqld: unknown variable 'log_bin_basename=/mysql/logs/binary/deg-db-01-bin'

How to repeat:
1 .add on my.cnf:

log_bin_basename= /path/to/binlogs/
log_bin = binlog-bin

2. start mysql

Suggested fix:
it should work as described on http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_log_bin_... and act as a base name for log-bin variable

> Holds the name and complete path to the binary log file. Unlike the log_bin system variable, log_bin_basename reflects the name set with the --log-bin server option.
[4 Dec 2013 15:38] Peter Laursen
I am still on 5.6.14 (did not upgrade yet) and here the variable exists.  At lest it is returned by

SHOW VARIABLES LIKE 'log_bin%'

/* returns

Variable_name                    Value   
-------------------------------  --------
log_bin                          OFF     
log_bin_basename                         
log_bin_index                            
log_bin_trust_function_creators  OFF     
log_bin_use_v1_row_events        OFF     

*/

Peter
(not a MySQL/Oracle person)
[4 Dec 2013 15:43] Peter Laursen
And not listed here that there is any change in this respect such as teh variable being renamed): http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-15.html
[4 Dec 2013 15:55] Marcelo Altmann
it turns out that this is a variable but you cannot change it

on my.cnf I have:
log-bin = /mysql/logs/binary/deg-db-01-bin

when I start mysql with that option it sets log_bin to ON and log_bin_basename to /mysql/logs/binary/deg-db-01-bin

mysql> SHOW VARIABLES LIKE 'log_bin%';
+---------------------------------+----------------------------------------+
| Variable_name                   | Value                                  |
+---------------------------------+----------------------------------------+
| log_bin                         | ON                                     |
| log_bin_basename                | /mysql/logs/binary/deg-db-01-bin       |
| log_bin_index                   | /mysql/logs/binary/deg-db-01-bin.index |
| log_bin_trust_function_creators | OFF                                    |
| log_bin_use_v1_row_events       | OFF                                    |
+---------------------------------+----------------------------------------+
5 rows in set (0.00 sec)

Marcelo Altmann
[5 Dec 2013 9:18] Hartmut Holzgraefe
so it should actually live in SHOW STATUS, not SHOW VARIABLES?
[5 Dec 2013 9:58] MySQL Verification Team
Hello Marcelo,

Thank you for the report.
"log_bin_basename" is a global read-only variable that contain the base file name used for the binary log files. 

Also, documented here http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-optvar.html

Imho - this was implemented as part of http://dev.mysql.com/worklog/task/?id=5465 [Tab - High Level Architecture]

Thanks,
Umesh
[16 Feb 9:17] Ankit Kapoor
does that mean variable "log bin basename" cannot be set in my.cnf.

I am doing this

log-bin
log-bin-basename/path/to/binlog-bin
[16 Feb 9:18] Ankit Kapoor
I mean 

log-bin-basename=/path/to/binlog-bin