Bug #72350 MySQL Workbench crashes while trying to login with unprivileged user
Submitted: 15 Apr 2014 11:37 Modified: 13 May 2014 23:01
Reporter: Shahriyar Rzayev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:6.1.4 OS:Linux (Ubuntu 12.04)
Assigned to: CPU Architecture:Any

[15 Apr 2014 11:37] Shahriyar Rzayev
Description:
After installing MySQL Workbench 6.1.4 on Ubuntu 12.04 try to login to MySQL 5.6.10 in remote server at got a crash.

Created new user on MySQL 5.6.10 with no privilege(only with USAGE grant).

With this user tried to Connect with Workbench but it suddenly disappears (crashed).

After granting ALL privileges to this user it works as usual.

Here is related information to this crash:

shahriyar@sh-work:~/.mysql/workbench/log$ cat sql_actions_master_230.log
[1, 14:59:37] Get schemata: Error Code: 1227
Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation
[1, 15:01:34] Get schemata: Error Code: 1227
Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation
[1, 15:02:40] Get schemata: Error Code: 1227
Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation
[1, 15:02:52] Get schemata: Error Code: 1227
Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation
[1, 15:05:02] Get schemata: Error Code: 1227
Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation
[1, 15:07:15] Get schemata: Error Code: 1227
Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation
[1, 15:09:19] Get schemata: Error Code: 1227
Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation
[1, 15:11:37] Get schemata: Error Code: 1227
Access denied; you need (at least one of) the SHOW DATABASES privilege

shahriyar@sh-work:~/.mysql/workbench/log$ cat wb.log
15:10:58 [INF][      WBContext]: Parsing application arguments.
15:10:58 [INF][      WBContext]:     /usr/bin/mysql-workbench-bin
15:10:59 [INF][   WBContext UI]: Initializing workbench context UI with these values:
	base dir: /usr/share/mysql-workbench
	plugin path: /usr/lib/mysql-workbench/plugins
	struct path: /usr/share/mysql-workbench/grt
	module path: /usr/lib/mysql-workbench/modules
	library path: /usr/share/mysql-workbench/libraries
	user data dir: /home/shahriyar/.mysql/workbench
	open at start: 
	open type: 
	run at startup: 
	run type: 
	Force SW rendering: No
	Force OpenGL: No
	quit when done: No
15:10:59 [INF][      WBContext]: WbContext::init
15:10:59 [INF][            WBA]: Looking for extension modules for WBA...
15:10:59 [INF][            WBA]: 0 extension modules found
15:10:59 [WRN][            grt]: /home/shahriyar/.mysql/workbench/connections.xml:24: link '001e7dca-c486-11e3-b74c-bc5ff4122801' <object GrtObject> key=owner could not be resolved
15:10:59 [INF][      WBContext]: System info:
 	MySQL Workbench Community (GPL) for Linux/Unix version 6.1.4  revision 11773 build 1454
	Configuration Directory: /home/shahriyar/.mysql/workbench
	Data Directory: /usr/share/mysql-workbench
	Cairo Version: 1.10.2
	OS: Linux 3.11.0-19-generic
	CPU: 4x Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz (2901.000MHz) - 3.58GiB RAM
	Distribution: Ubuntu 12.04.4 LTS

15:10:59 [INF][               ]: /usr/share/mysql-workbench/extras
15:11:37 [INF][     SSH tunnel]: Starting tunnel
15:11:37 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: Access denied for user 'shahriyar_r'@'85.132.89.45' (using password: NO)
15:11:37 [ERR][SqlEditorSchemaTree]: SQLException executing Get schemata: Error Code: 1227
Access denied; you need (at least one of) the SHOW DATABASES privilege

How to repeat:
Download MySQL Workbench latest .deb file and install on Ubuntu 12.04.

Create MySQL user with no privileges on remote server.

Try to connect with this user.

Suggested fix:
Any Pop-up error window that will say:

"You have not all necessary privileges with this user to use it in Workbench"

or something similar and informative.

Or maybe let it just connects as usual but does not show all grant related information in dashboard etc.
[5 May 2014 12:47] Marcin Szalowicz
Thank you for the bug report.
[13 May 2014 23:01] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.1.6 release, and here's the changelog entry:

MySQL Workbench could crash when using a MySQL connection when the
connection's user lacked proper permissions.

Thank you for the bug report.