Tag Archives: Mac MYSQL Flashback

How to Solve MacOS Big Sur MySQL workbench flashback problem

The program is executed directly from the command line

$ /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench
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'

Current thread 0x000000010a883e00 (most recent call first):
Abort trap: 6

After checking that there is no Python 3.7 on the system, the solution is as follows:

# Install python 3.7
$ brew install [email protected]
# Create a soft connection
$ sudo ln -s /usr/local/Cellar/python\@3.7/3.7.10/Frameworks/Python.framework /Library/Frameworks/Python.framework

Run MySQL workbench again successfully.

[How to Fix] MySQL Workbench for Mac Flashback

After MySQL workbench 8.0.23 Mac version is installed successfully, double-click to open and flash back

Start at the command line and you can see the error:

Fatal Python error: initfsencoding: unable to load the file system codec, sys.path = ['/Users/georgi/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'

The reason is python

Solution:

1. Scheme 1: command line startup

PYTHONPATH=/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7 /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench

2. Scheme 2: modify the MySQL workbench running file

cd /Applications/MySQLWorkbench.app/Contents/MacOS
mv MySQLWorkbench MySQLWorkbench.bak
echo "PYTHONPATH=/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7 /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench.bak" > MySQLWorkbench
chmod +x MySQLWorkbench

After executing the above commands, double-click MySQL workbench to start normally

reference resources: https://bugs.mysql.com/bug.php?id=102364