5

I have created an user i intend to give access to one db only. But when i try connecting with him, the program crashes. When i connect with the root user, it works.

 create user 'test'@'localhost';
 GRANT ALL PRIVILEGES ON sbb2_test.* To 'test'@'localhost' IDENTIFIED BY 'test';
 FLUSH PRIVILEGES;

Then i have verified he has the permissions for the sbb2_test db only:

 SHOW GRANTS FOR 'test'@'localhost'

Output:

'GRANT USAGE ON *.* TO \'test\'@\'localhost\' IDENTIFIED BY PASSWORD \'*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29\''
'GRANT ALL PRIVILEGES ON `sbb2_test`.* TO \'test\'@\'localhost\''

Then i have tried connecting with the new user:

screen 1

screen 2

I have entered "test" as the password, and the program crashed. Why? These are the last lines from the wb.log file:

15:58:40 [INF][ Workbench]: Current version given by meta info is: 6.1.7

15:58:41 [INF][ Workbench]: Exiting as another instance of WB is already running. 15:58:41 [INF][ Workbench]: Running the application

15:58:41 [INF][ WBContext]: Parsing application arguments.

15:58:41 [INF][ WBContext]: C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\MySQLWorkbench.exe

15:58:46 [WRN][ WBContext UI]: Server instance has no attached connection, deleting it

15:58:46 [WRN][ WBContext UI]: Server instance has no attached connection, deleting it

15:59:17 [INF][ SSH tunnel]: Starting tunnel

15:59:17 [ERR][ GRTDispatcher]: exception in grt execute_task, continuing: Exception: Access denied for user 'test'@'localhost' (using password: NO)

15:59:30 [INF][ Admin]: Auto-created instance profile for connection

15:59:30 [ERR][ WBContext]: Unsupported server version: mariadb.org binary distribution 10.1.26-MariaDB

1
  • 15:59:30 [ERR][ WBContext]: Unsupported server version: mariadb.org binary distribution 10.1.26-MariaDB Have you looked deeper into this? Mar 13, 2018 at 16:20

3 Answers 3

7

Looks like a known issue with it not handling an exception error properly and also the wrong version: https://bugs.mysql.com/bug.php?id=79364

Description: WB 6.3.5 (and also older release like 6.1.7) can connect to MariaDB.

> How to repeat:
> 1. Download WB 6.3.5 CE 64 bit (32 bit has the same issue)
> 2. Download MariaDB 10.0.22 64 bit windows
> 3. Start MariaDB using mysqld --console
> 4. Create a new connection using WB : testing the connection works
> 5. Connect to the database ( may or may not crash) : a SQL tab opens
> 6. Connect to the same database : crashes : it says MySQL workbench has stopped working : a new SQL tab can not open

[20 Nov 2015 23:32] Godofredo Miguel Solorzano
Thank you for the bug report. Looks like you have the reason for in the log:

15:14:22 [ERR][      WBContext]: Unsupported server version: mariadb.org binary distribution 10.0.22-MariaDB

Are you using containers in your environment?

edit: For now I solved it this way:from the menu Database => Manage Connections... I have created and saved the connection for the "test" user, so that it appears on the start screen ( when you launch WB, the saved connections appear as a list of gray buttons , and you can launch them directly from there).

4
  • 2
    I will try updating WB. For now i solved in this way: from the menu Database => Manage Connections... i have created and saved the connection for the "test" user, so that it appears on the start screen ( when you launch WB, the saved connections appear as a list of gray buttons , and you can launch them directly from there). Then i clicked on the saved connection and it worked from there! Very funny. What are containers?
    – HelloWorld
    Mar 13, 2018 at 17:28
  • excellent! Containers are more of a devops concept in which they package entire app stacks together within a 'container'. This is probably not the case from here. I'm going to update my answer to include your comments so everyone can see the workaround that you used in the meantime. Mar 13, 2018 at 18:24
  • 1
    I know "me-too" is discouraged here, but wanted to add that even in 6.3.10 this is still an issue and by adding the connection using "Manage Connections" as @Pixel mentioned instead of just choosing to connect to the database it will keep it from crashing.
    – Tony Maro
    Jul 16, 2018 at 12:18
  • Hate to be another "me too" but almost 4 years later, on version 8.0.26 and this problem exists still. And this solution got me around the crash.
    – JoelAZ
    Oct 14, 2021 at 20:53
3

If you try to connect directly, it will crash. Below is the solution.

Solution:

  1. Go to Database -> Manage Connections
  2. New -> Enter the connection details
  3. Click test connection. It will show a warning if you are connecting to incompatible version.
  4. If credentials are OK and the port 3306 is open and the used user is set to connect from any host, then a success message will appear.
  5. From now on, workbench won't crash.

Black box reasoning: It seems that connecting directly to incompatible DB halts the application because it tries to expose full features to incompatible DB, however, after doing the above test, workbench identifies the available limitations and then can deal with it along the way.

0

MySQL Workbench may crash when connecting to databases due to a corrupted User Snippets file. The file may be corrupted if you edit it outside of Workbench. Deleting the snippet file will force MySQL Workbench to create a new one next time it attempts to connect to a database.

On a Mac, the file is located at {HOME}/Library/Application\ Support/MySQL/Workbench/snippets/User\ Snippets.txt; where {HOME} looks like ~username. Before deleting, open the file with a text editor to save any snippets you want to re-create.

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.