Bug #63918 Cannot read server logs
Submitted: 4 Jan 2012 12:43 Modified: 25 Apr 2013 21:38
Reporter: Van Stokes Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S2 (Serious)
Version:5.2.37 rev 8576 OS:Linux (Ubuntu 11.10 x86_64)
Assigned to: CPU Architecture:Any
Tags: Administration, error, log, redhat, rhel, slow

[4 Jan 2012 12:43] Van Stokes
Description:
WB unable to access server logs via ssh because it is using the wrong filename. It is *NOT* using the my.cnf file settings to read the log file.

The MySQL server version is 5.0.77-log running on RHEL 2.6.18.
WB is running on a Ubuntu 11.10 x86_64 workstation using SSH to access the log files on the MySQL server.

WB gives the following error:
Could not read file /var/lib/mysql/logilive.mydomain.com.err in remote server. Please verify path and permissions.

Could not read file /var/lib/mysql/logilive.mydomain.com.slow in remote server. Please verify path and permissions.

When I view the WB->Options File->Log Files the proper Log and paths are there.

How to repeat:
Configure RHEL 2.6.18 with RHEL MySQL distro.
Configure WB connection via the the New Server Instance and specify the installation type of: 
OS: Linux
MySQL Installation Type: RHEL (MySQL Package)

Configure ssh remove access.

Suggested fix:
Use the my.cnf file to ascertain the location of the log files.
[4 Jan 2012 20:04] Peter Laursen
There is no guarantee that logging acutally happens as specified in my.cnf/my.ini as "SET GLOBAL slow_query_log_file|general_log_file .. " to a running instance by a user with sufficient privileges.  

It is possible (as a user with SUPER privilege) to change all logging parameters including log files and paths 'on the fly'.

WB should query those variables readther than reading the configuration file.

Refer: 
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_slow_query_log_...
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_slow_query_log_...

Peter
(not a MySQL person)
[13 Jan 2012 11:55] Valeriy Kravchuk
Solution Peter suggested sounds reasonable.
[10 Feb 2012 14:20] Sergio Andres De La Cruz Rodriguez
@Peter: WB takes the log paths from the server variables. However, this is not possible in these cases where server version < 5.1.29. Prior to this version, MySQL does not store the log file paths in server variables.
[25 Apr 2013 21:38] Alfredo Kojima
This issue is specific to MySQL 5.0, which is past its EOL and no longer supported. As mentioned before, MySQL 5.0 does not support reporting the location of its log files through the server variable mechanism, which is what WB relies on for that information.