Bug #83035 Mysql Workbench Instance Server Logs fail to open /etc/my.cnf
Submitted: 18 Sep 2016 18:22 Modified: 19 Sep 2016 16:31
Reporter: Adolfo Yanes Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.3.7 build 1199 CE(64 bits) Community OS:Mac OS X (10.11.6 )
Assigned to: CPU Architecture:Any
Tags: my.cnf workbench instance server logs

[18 Sep 2016 18:22] Adolfo Yanes
Description:
Same error that occurs in two  different cases:

1.- Workbench results in error when trying to open "Server Logs" 

2.- Workbench results in error when trying to setup a new connection using "Configure Server management" in step "Test Host Machine Settings"

Startup / Shutdown works fine
and
Options File works fine

Connection form the same computer running server using standard TCP/IP or Socket, fails in both cases.

See below permissions and content(just 1 line) for my.cnf

ls -l /etc/my.cnf
-rw-------  1 root  wheel  9 Sep 17 19:08 /etc/my.cnf

sudo cat /etc/my.cnf
Password:
[mysqld]

User root@localhost

Server Directories
Error Log On /usr/local/mysql/data/mysqld.local.err      It works fine

Log Summary:

13:56:58 [ERR][         python]: error calling WbAdmin.testInstanceSettingByNameTraceback (most recent call last):
13:56:58 [ERR][         python]:   File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/wb_admin_grt.py", line 776, in testInstanceSettingByName
13:56:58 [ERR][         python]:     if check_if_config_file_has_section(open(config_file, "r"), section):
13:56:58 [ERR][         python]: IOError: [Errno 13] Permission denied: '/etc/my.cnf'
13:56:58 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: error calling Python module function WbAdmin.testInstanceSettingByName
13:56:58 [ERR][  GRTDispatcher]: worker: task 'wizard task' has failed with error:.error calling Python module function WbAdmin.testInstanceSettingByName

-------------------------------------------

13:29:22 [INF][      WBContext]: System info:
 	MySQL Workbench Community (GPL) for Mac OS X version 6.3.7 CE build 1199 (64 bit)
	Configuration Directory: /Users/aiyanes/Library/Application Support/MySQL/Workbench
	Data Directory: /Applications/MySQLWorkbench.app/Contents/Resources
	Cairo Version: 1.10.2
	OS: OS X 10.11.x El Capitan
	CPU: 8x Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz - 16.00GiB RAM

13:29:27 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: Access denied for user 'root'@'localhost' (using password: NO)
13:29:27 [ERR][  GRTDispatcher]: worker: task 'execute sql queries' has failed with error:.Access denied for user 'root'@'localhost' (using password: NO)
13:29:32 [INF][      SqlEditor]: Opened connection 'Local instance 3306' to MySQL Community Server (GPL) version 5.7.15
13:29:32 [INF][     AutoCCache]: Initializing autocompletion cache for Local_instance_3306
13:30:54 [ERR][         python]: error calling WbAdmin.testInstanceSettingByNameTraceback (most recent call last):
13:30:54 [ERR][         python]:   File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/wb_admin_grt.py", line 776, in testInstanceSettingByName
13:30:54 [ERR][         python]:     if check_if_config_file_has_section(open(config_file, "r"), section):
13:30:54 [ERR][         python]: IOError: [Errno 13] Permission denied: '/etc/my.cnf'
13:30:54 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: error calling Python module function WbAdmin.testInstanceSettingByName
13:30:54 [ERR][  GRTDispatcher]: worker: task 'wizard task' has failed with error:.error calling Python module function WbAdmin.testInstanceSettingByName
13:50:32 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: Access denied for user 'root'@'localhost' (using password: NO)
13:50:32 [ERR][  GRTDispatcher]: worker: task 'execute sql queries' has failed with error:.Access denied for user 'root'@'localhost' (using password: NO)
13:50:36 [INF][      SqlEditor]: Opened connection 'Local instance 3306' to MySQL Community Server (GPL) version 5.7.15
13:50:36 [INF][     AutoCCache]: Initializing autocompletion cache for Local_instance_3306
13:56:58 [ERR][         python]: error calling WbAdmin.testInstanceSettingByNameTraceback (most recent call last):
13:56:58 [ERR][         python]:   File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/wb_admin_grt.py", line 776, in testInstanceSettingByName
13:56:58 [ERR][         python]:     if check_if_config_file_has_section(open(config_file, "r"), section):
13:56:58 [ERR][         python]: IOError: [Errno 13] Permission denied: '/etc/my.cnf'
13:56:58 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: error calling Python module function WbAdmin.testInstanceSettingByName
13:56:58 [ERR][  GRTDispatcher]: worker: task 'wizard task' has failed with error:.error calling Python module function WbAdmin.testInstanceSettingByName
 

How to repeat:
See above

Suggested fix:
If mysql on mac OS X does not use my.cnf, workbench should not attempt to open it when running on Mac OS X and my.cnf is located in /etc
[19 Sep 2016 16:31] MySQL Verification Team
Thank you for the bug report. Duplicate of http://bugs.mysql.com/bug.php?id=82600.