Phil Nguyen
Phil Nguyen

Reputation: 331

MySQL Workbench cannot open on Mac

MySQL Workbench on Mac (10.14) opens only for a moment and closes immediately without any (visible) error message. Re-installing it does not solve the problem.

What can I do to fix this problem?

Upvotes: 17

Views: 37044

Answers (14)

Vipul Gupta
Vipul Gupta

Reputation: 491

I also have faced a similar problem after upgrading MAC OS To Monterey, The solution worked just upgrade your MySQL Workbench 8.0.30. Link: https://dev.mysql.com/downloads/workbench/

Upvotes: 0

Akash Mohite
Akash Mohite

Reputation: 1

/Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench --verbose

I opened with this command once and it after that it started opening normally.

PS I have python 3.7 installed

Upvotes: 0

Kiran Rai Chamling
Kiran Rai Chamling

Reputation: 508

I upgraded the OS and I faced the issue with the Workbench. It was not loading. So, I downloaded it and installed it again. I got an option to keep both or replace them. I choose to Replace. This resolved the loading issue. Now, it's opening.

Upvotes: 1

Sharanjeet Singh
Sharanjeet Singh

Reputation: 75

I just installed newer version and it automatically replaced the old version and it worked!

Upvotes: 0

Seder
Seder

Reputation: 2763

macOS Monterey, using version ( 8.0.29 ) solved the issue

Upvotes: 3

Hemant Nagpal
Hemant Nagpal

Reputation: 624

I faced this problem when my mac was updated to Monterey. I downloaded the workbench again from this link Official Mysql and installed it. I replaced the older workbench into my Applications and was able to retrieve servers i setup with the older workbench. Cheers.

Upvotes: 3

yakob abada
yakob abada

Reputation: 1297

MySQLWorkbench need Python3.7 Framework in /Library/Frameworks/Python.framework/Versions

  1. brew install [email protected]
  2. sudo cp -r /usr/local/Cellar/[email protected]/3.7.12/Frameworks/Python.framework/Versions/3.7 /Library/Frameworks/Python.framework/Versions
  3. open MySQLWorkbench, it's work

Upvotes: 38

Tim Burch
Tim Burch

Reputation: 1103

Try running the following command in your terminal, to remove the app from quarantine:

xattr -d com.apple.quarantine /path/to/MySQLWorkbench.app

Note that the default path is /Applications, i.e., the default filename is /Applications/MySQLWorkbench.app

Upvotes: 0

Sanket H patel
Sanket H patel

Reputation: 121

If you are using macOS 10.15 or lesser version just switch to older version of workbench(8.0.11), which is the stabile version and compatible with macOS 10.15 or lesser version. For download Click here

Upvotes: 1

Mahmoud Abdelsattar
Mahmoud Abdelsattar

Reputation: 1469

One solution worked with me:

System Preferences -> Security & Privacy -> click “Open Anyway”.

And don't forget to unlock the Lock icon at the bottom left.

enter image description here

Upvotes: 10

Divya
Divya

Reputation: 21

I had the same issue as above. Downloading the older version from archives resolved the issue.

Upvotes: 2

EdM
EdM

Reputation: 585

There are a couple of things potentially going on.

One is the Mac Security and Privacy control, addressed nicely by Mahmoud Mostafa in another answer.

But even once that's gotten around, there is the problem of where this app is looking for Python. Running Catalina 10.15.7, I used the terminal command suggested by Phil Nguyen and got a different error message:

Fatal Python error: initfsencoding: unable to load the file system codec, sys.path = ['/Applications/MySQLWorkbench.app/Contents/Resources/libraries', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload'] ModuleNotFoundError: No module named 'encodings'

To my surprise, I saw that there was no Python.framework within /Library/Frameworks/ at all. I'd been using Anaconda, which installed Python under my user directory.

As I had also installed Xcode tools, I just made a symbolic link* within /Library/Frameworks/ pointing to the Python framework at

/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework

and changed the name of the symbolic link to Python.framework. That provides a Python 3.7 instead of forcing things back to Python 2 or using an old version of Workbench. Worked for me; YMMV.


*This needs to be a symbolic link made by ln -s in a Terminal window and not a Finder-generated alias. Working in /Library/Frameworks/ will require sudo.

Upvotes: 2

Ernesto
Ernesto

Reputation: 99

I solved downloading an older version of Workbench (8.0.20)

Upvotes: 9

Phil Nguyen
Phil Nguyen

Reputation: 331

Open your terminal and type:

/Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench --verbose

if your terminal said:

Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x!
PYTHONPATH is currently: ":/Applications/MySQLWorkbench.app/Contents/Resources/libraries"
You should `unset PYTHONPATH` to fix this.

Type this:

export PYTHONPATH=/usr/local/lib/python2.7/site-packages/    

Upvotes: 1

Related Questions