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.

user1002119
  • 3,692
  • 4
  • 27
  • 30
  • 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. – Bas Sep 08 '16 at 20:23
  • 1
    Is this an SSH connection? There are troubles with the underlying SSH library (paramiko) which causes a lot of grief lately. – Mike Lischke Sep 09 '16 at 06:43
  • I have the exact same situation. My connection is 'Standard (TCP/IP)' – cellepo Oct 28 '16 at 17:04
  • Upgrade to 6.3.8 and it will work again. – Youri Thielen Dec 08 '16 at 09:51
  • 3
    @YouriThielen not for me. 6.3.8 hangs too. must force quit almost every time. – Nick Humphrey Jan 06 '17 at 08:54
  • 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. – jmiraglia Dec 15 '16 at 17:48
  • 2
    I had this issue. Tried every solution below, none stuck. Ultimately "solved" it by switching to SQL Pro (https://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... – Owen Jan 25 '17 at 06:05
  • 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. – Christopher Hunter Nov 04 '22 at 22:42

15 Answers15

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"
JayRizzo
  • 3,234
  • 3
  • 33
  • 49
Loša
  • 2,621
  • 2
  • 14
  • 19
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.

DenisMP
  • 973
  • 2
  • 16
  • 31
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.

user1002119
  • 3,692
  • 4
  • 27
  • 30
  • 2
    Yes, this worked for me. Also, I deleted the local folder in ~/Library/Application\ Support/MySQL/Workbench - this has all the cache, etc. Backed up the connections first using Tools -> Connections -> Backup – Farhad Oct 13 '16 at 05:14
  • 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. – Jurgenfd Oct 14 '16 at 13:10
  • 1
    Deleting the local folder does not help – cellepo Oct 28 '16 at 17:18
  • 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) – cellepo Nov 14 '16 at 23:08
  • I found that deleting the cache and workspaces folder contents (~/Library/Application Suppo – George Nov 16 '16 at 03:00
  • 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](https://bugs.mysql.com/bug.php?id=82778) days it's fine for them. – Iskar Nov 16 '16 at 12:15
  • Rather than going through the hassle of downgrading, I would recommend the very simple solution provided by @DenisMP below until this bug is fixed. – nomad Nov 27 '16 at 02:39
  • 4
    Yes, this definitely helped. Here's the link just in case: http://dev.mysql.com/downloads/file/?id=452671 – Ron Dec 16 '16 at 00:40
  • Downgrading isn't an option in my case, turning off SSL worked. – Peter Wooster Dec 29 '16 at 16:08
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.

  • 1
    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. – Bryan B. Dec 02 '16 at 17:40
  • 1
    This worked, it should be the accepted answer as downgrading isn't always an option. – Peter Wooster Dec 29 '16 at 16:08
  • 2
    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. – Greg Brown Jan 25 '17 at 17:06
  • 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. – ficuscr Feb 01 '17 at 21:39
  • This idea worked for me in windows with mysql WB 6.3.7 as well. Thanks! – Manoj Apr 10 '18 at 07:01
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/

lft93ryt
  • 948
  • 1
  • 16
  • 32
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

dreadnought
  • 133
  • 2
  • 5
3

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

Kushal Kumar
  • 173
  • 1
  • 14
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..

Enamul Haque
  • 4,789
  • 1
  • 37
  • 50
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.

George
  • 1,224
  • 12
  • 21
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.

Dave Korns
  • 11
  • 1
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
Matt Kuhns
  • 1,328
  • 1
  • 13
  • 26
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.

cellepo
  • 4,001
  • 2
  • 38
  • 57
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.

Ivq
  • 131
  • 1
  • 3
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.

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

Kaya Toast
  • 5,267
  • 8
  • 35
  • 59