MySQL Workbench 6.3 (Mac) hangs on simple queries
Asked Answered
S

15

89

I am using MySQL Workbench 6.3.7 build 1199 CE (64 bits) on a Mac with OS X Yosemite 10.10.5. I am connecting to an Amazon RDS MySQL instance.

When I enter a simple query such as

select * from `devices`;

and click the lightning-bolt-with-cursor icon, the query starts, indicated by the spinner activating next to the "SQL File 4" tab in the following screenshot. However, the query doesn't complete and it just hangs. The white-hand-in-red-stop-sign icon is disabled.

screenshot of MySQL Workbench in hung state

I can only force quit MySQL Workbench from this point on. If I try to do a regular quit, nothing happens.

How can I consistently run a simple query on my database? Sometimes it works (maybe 10% of the time), but it mostly just hangs.

Sidman answered 8/9, 2016 at 20:22 Comment(8)
Workbench crashed a lot and is quite unstable. But it might have something to do with the connection as well. Although this question belong on SO imo.Dock
Is this an SSH connection? There are troubles with the underlying SSH library (paramiko) which causes a lot of grief lately.Monte
I have the exact same situation. My connection is 'Standard (TCP/IP)'Whitehurst
Upgrade to 6.3.8 and it will work again.Viscosity
I've run into so many stability issues with MySQL Workbench for Mac that did not exist in the Windows version. I finally gave up and switched over to using DataGrip. There are some things I miss from Workbench, but at least DataGrip hasn't crashed on me yet, or just completely locked up like 5 times per day.Loutitia
@YouriThielen not for me. 6.3.8 hangs too. must force quit almost every time.Spicer
I had this issue. Tried every solution below, none stuck. Ultimately "solved" it by switching to SQL Pro (sequelpro.com) which is free and open-source. Definitely not a solution for everyone, but for those new to MySQL (like I was), it's nice to know there are options...Tybie
I have repeatedly run into this issue on macs and can't find a fix. However, while the query is 'hanging', hitting save (cmd+s) seems to stop the spinning icon and will return the status of the last query at least. It's hacky, but it allows you to work somewhat normally again.Anecdote
S
41

To resolve this issue, I downgraded MySQL Workbench to 6.1. Now I am able to run my query and it doesn't hang.

Sidman answered 8/9, 2016 at 22:23 Comment(9)
Yes, this worked for me. Also, I deleted the local folder in ~<username>/Library/Application\ Support/MySQL/Workbench - this has all the cache, etc. Backed up the connections first using Tools -> Connections -> BackupMotivate
This worked for me too but there are nice features in the latest release so does anybody know a work around in the latest version 6.3.8 (Mac)? Just like the OP I only get a random ~10% success rate on connection.Marinmarina
Deleting the local folder does not helpWhitehurst
I also have since downgraded to 6.1 (6.1.11891 specifically), and so far that has resolved the problem for me too. 6.1 was the latest that works (other versions in between that and latest 6.3.8 did not work)Whitehurst
I found that deleting the cache and workspaces folder contents (~/Library/Application SuppoShrink
6.1 doesn't work for me because "incompatible ssh peer (no acceptable kex algorithm)". For now I am using the workaround from @DenisMP; seems to work half-decent other than needing to force-quit Workbench all the time. Hopefully they are working to fix the issue, except the last few comments on bug 82778 days it's fine for them.Ogre
Rather than going through the hassle of downgrading, I would recommend the very simple solution provided by @Terrazzo below until this bug is fixed.Dasteel
Yes, this definitely helped. Here's the link just in case: dev.mysql.com/downloads/file/?id=452671Obliquely
Downgrading isn't an option in my case, turning off SSL worked.Dioscuri
A
114

UPDATE 3: The problem is fixed for MacOS HighSierra in MySQL Workbench 6.3.10.

UPDATE 2: It looks like the bug is recurring again in MacOS HighSierra. See https://bugs.mysql.com/bug.php?id=83658 for more details.

There is an unofficial build that fixes the problem. You can download it at: https://drive.google.com/drive/folders/0B2fTesDcrHzVRGVFWEdILWpuaEE?usp=sharing

The build was created by Bob Davenport. See https://bugs.mysql.com/bug.php?id=87714 for more details.


UPDATE: The bug is fixed in MySQL Workbench 6.3.9.

----------------------- original answer -----------------------

It is a known MySQL bug: http://bugs.mysql.com/bug.php?id=83658 caused by GateKeeper Path Randomisation introduced in MacOS Sierra. See https://weblog.rogueamoeba.com/2016/06/29/sierra-and-gatekeeper-path-randomization/.

A possible workaround is to remove the Quarantine ACL:

xattr -dr com.apple.quarantine "/Applications/MySQLWorkbench.app"

OR (incase you get the option -r not recognized err.

/usr/bin/xattr -dr com.apple.quarantine "/Applications/MySQLWorkbench.app"
Acrid answered 9/12, 2016 at 9:35 Comment(7)
Thanks for the deeper insight into the origin of this seemingly silly bug. So frustrating.Egoism
working for me thanxx hope the issue is fixed with this solutionAril
Upgrading to MySQL Workbench 6.3.9 resolved the issue for me. Had to manually download it, as the previous version claimed to be up to date.Carmody
MySQL Workbench 6.3.9 on macOS High Sierra 10.13 still has this problem. Turning off SSL doesn't work.Jessy
Does anybody have a fix for High Sierra?Highpitched
upgrading to 6.3.9 doesn't resolve my issue. Using xattr-workaround either. But the unofficial build fixes the problem.Halland
If you get option -r not recognized use /usr/bin/xattr I posted why here https://mcmap.net/q/98265/-how-do-i-remove-the-quot-extended-attributes-quot-on-a-file-in-mac-os-xThromboplastic
T
53

I found that if you use the latest 6.3 version, that in order to get queries to work, you have open a first connection and ignore it and then open a second connection. This creates two tabs in the workbench. If you perform your queries in the second tab, it works. If you try in the first tab, it hangs.

I also have found that you have to do a force quit the workbench.

I hope the mysql folks get this fixed.

Terrazzo answered 4/11, 2016 at 14:2 Comment(7)
I'm using 6.3.8.CE and experience the same thing...but not all the time...Infuscate
I'm using v6.3.8 and it worked for me too. I've been experiencing the issue since v6.3.3 by the way.Pyrethrum
It`s still happening, very annoying. When does release 6.3.9 will be available? The hack still works, but once in a while i forget to do it, and have to force quit and open it again.Hurt
Working on MWorkbench 6.3.4.0 build 828! OS Sierra 10.12.2 Thanks! :)Throwaway
Have found this months ago by coincidence and using it ever since. Now on 6.3.6 build 511Cysteine
This bug was fixed in MySQL Workbench 6.3.9.Maurist
Unfortunately, not working on High Sierra with Workbench 6.3.9Stormie
S
41

To resolve this issue, I downgraded MySQL Workbench to 6.1. Now I am able to run my query and it doesn't hang.

Sidman answered 8/9, 2016 at 22:23 Comment(9)
Yes, this worked for me. Also, I deleted the local folder in ~<username>/Library/Application\ Support/MySQL/Workbench - this has all the cache, etc. Backed up the connections first using Tools -> Connections -> BackupMotivate
This worked for me too but there are nice features in the latest release so does anybody know a work around in the latest version 6.3.8 (Mac)? Just like the OP I only get a random ~10% success rate on connection.Marinmarina
Deleting the local folder does not helpWhitehurst
I also have since downgraded to 6.1 (6.1.11891 specifically), and so far that has resolved the problem for me too. 6.1 was the latest that works (other versions in between that and latest 6.3.8 did not work)Whitehurst
I found that deleting the cache and workspaces folder contents (~/Library/Application SuppoShrink
6.1 doesn't work for me because "incompatible ssh peer (no acceptable kex algorithm)". For now I am using the workaround from @DenisMP; seems to work half-decent other than needing to force-quit Workbench all the time. Hopefully they are working to fix the issue, except the last few comments on bug 82778 days it's fine for them.Ogre
Rather than going through the hassle of downgrading, I would recommend the very simple solution provided by @Terrazzo below until this bug is fixed.Dasteel
Yes, this definitely helped. Here's the link just in case: dev.mysql.com/downloads/file/?id=452671Obliquely
Downgrading isn't an option in my case, turning off SSL worked.Dioscuri
S
21

In my case, it was changing the connection->ssl->Use SSL setting from "If available" to "No". Workbench 6.3.8 on OSX 10.12.1 now works for me.

Such answered 30/11, 2016 at 11:40 Comment(5)
This seems to have done the trick as far as I can tell so far: I can run queries in the first connection tab again! Thanks.Logarithm
This worked, it should be the accepted answer as downgrading isn't always an option.Dioscuri
FYI, to get to this setting, select Database | Manage Connections from the menu. In the dialog that appears, select the connection (e.g. localhost) from the list on the left, then select the "Connection" tab, then the "SSL" tab. From there, you can change the value of the "Use SSL" drop-down.Thebaine
Best solution that I've found. Alleviated if not cured my issues that arose after Sierra osx upgrade. Would think Oracle would be flush enough with money from Ask foistware to maintain products.Zielsdorf
This idea worked for me in windows with mysql WB 6.3.7 as well. Thanks!Ringtail
W
17

The spinning wheel of death is due to the new feature introduced in the Sierra update called "Gatekeeper Path Randomization".

Follow the instructions:

  • Open MySQL Workbench :)
  • Right click on your connection (most likely “localhost” or “127.0.0.1”)
  • Choose “Edit connection”
  • On the right hand window select “Connection > SSL”
  • Change “Use SSL” from “If available” to “No”
  • Now click on the tab “System Profile”
  • Choose “MacOS X” as System Type
  • Click “Test connection”

Credits: http://cordobo.com/2398-mysql-workbench-6-3-macos-sierra-hangs-on-simple-queries/

Westleigh answered 18/1, 2017 at 17:4 Comment(2)
So, why does the blog post you credit also link back to this question and references links from this answerVitavitaceous
Somehow the titles are the same.Westleigh
A
8

The version 6.3.9 solved the problem, but this version is not showing in "Check for upgrades" option, you need to download directly from the site.

MySQL Workbench official download page

Agateware answered 21/2, 2017 at 18:44 Comment(1)
Confirmed that this version fixes the issue.Kef
L
3

6.3.9 fixed the issue in the mac. Here is the link MySql 6.3.9

Linville answered 27/2, 2017 at 11:10 Comment(0)
G
2
  1. At last I have downloaded MySQL Workbench 6.3.10 and install MySQL Workbench 6.3.10 and solved my problem. I have downloaded MySQL Workbench 6.3.10 from bellow link https://dev.mysql.com/downloads/workbench/

  2. It is working for me.. I think this will work for you..

Goldi answered 9/12, 2017 at 17:33 Comment(0)
S
1

I found that deleting the cache and workspaces folder contents (~/Library/Application Support/MySQL/Workbench) it works again. What I haven't found is how to ensure it doesn't hang again :-(

I also found that if I manually close the Connection tab from the menu and exit WB from the menu and not from the OS window buttons it seems more stable next time.

PS: I am using SSH connection so it may be due to this but it is not always happening.

UPDATE: A clean install and no SSH configurations the issue still persists. Unless you manually go and delete the cache folder files it continues to hang.

Shrink answered 16/11, 2016 at 3:8 Comment(0)
N
1

I was getting around the problem for awhile by deleting the user library folder and dropping back to version 6.2.5 ... but today found the problem was back. So today I deleted the user library folder and dropped back to version 6.1.7. It's working again, for now.

Nut answered 20/12, 2016 at 18:23 Comment(0)
A
1

In my case, the IP address changed where mySQL was served. Flushing the DNS fixed it for me:

sudo dscacheutil -flushcache;
sudo killall -HUP mDNSResponder; 
say cache flushed
Awash answered 11/1, 2017 at 19:54 Comment(0)
W
0

This seemed to help some of the time, but not 100%: Connect to the database with a different user, and then re-connect with the original user.

I'm about to downgrade like the accepted answer says though, as this doesn't solve it every time.

Whitehurst answered 28/10, 2016 at 17:9 Comment(0)
M
0

This is still an open bug in 6.3.8: https://bugs.mysql.com/bug.php?id=82231

The possible workaround is to open secondary tab with the same connection and work in there. However it crashes anyway from time to time.

Until the bug is fixed I use free Mysql Workbench aleternative for common work. For mac users I would suggest https://sequelpro.com.

Marrano answered 27/1, 2017 at 16:19 Comment(0)
L
0

Upgrade to 6.3.9 fixed the issue. The 6.3.4 was hanging on queries for me. Unfortunately the Help > Check for Updates didn't indicate any updates were available, so I went to the source.

Legitimize answered 23/3, 2017 at 11:3 Comment(0)
Y
0

This can probably help as a temporary/immediate solution. If I try to manually type the below query, MySQL Workbench hangs, especially at x.*

SELECT 
    x.*
FROM x_table x;

But if I write the SQL in another editor and paste it in MySQL Workbench and run the query, it doesn't hang.

Versions: MacOS Big Sur (11.2), MySQL Workbench 8.0

Yandell answered 1/3, 2021 at 6:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.