MySQL Workbench 6.3 (Mac) hangs on simple queries

2019-01-16 03:51发布

问题:

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.

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.

回答1:

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"


回答2:

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.



回答3:

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



回答4:

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.



回答5:

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/



回答6:

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



回答7:

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



回答8:

  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..



回答9:

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.



回答10:

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.



回答11:

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.



回答12:

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


回答13:

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.



回答14:

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.