Bug #103986 Fatal error during database migration
Submitted: 11 Jun 2021 19:15 Modified: 29 Nov 2021 13:18
Reporter: David Gibbs Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S1 (Critical)
Version:8.0.25 OS:MacOS
Assigned to: CPU Architecture:Any

[11 Jun 2021 19:15] David Gibbs
Description:
13:11:14 [ERR][         Wizard]: Thread 'Determine number of rows to copy' failed: Error getting row count from source tables, wbcopytables exited with code -6

dyld: Library not loaded: @executable_path/../Frameworks/libmysqlclient.dylib
  Referenced from: /Applications/MySQLWorkbench.app/Contents/MacOS/wbcopytables
  Reason: no suitable image found.  Did find:
	file system relative paths not allowed in hardened programs

How to repeat:
Tried to migrate from one mysql server to another (aws lightsail mysql instance to aws lightsail hosted database), got as far as copying data, when the error occurred.
[19 Oct 2021 12:41] MySQL Verification Team
Bug #105217 marked as duplicate of this one.
[29 Nov 2021 13:18] MySQL Verification Team
Hello David Gibbs,

Thank you for the bug report.
I've tried to reproduce your issue on a Mac with workbench 8.0.27 but not seeing any issues at my end.
Discussed internally with the WB developers and confirmed that it is not seen.
If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Regards,
Ashwini Patil
[29 Jan 2022 14:06] Andrew Nagel
I am also seeing this exact same issue and the resolution noted here resolved it.

https://bugs.mysql.com/bug.php?id=105217

I am not sure why your dev team can't reproduce the issue the tool is trying to reference a file that just simply does not exist.
[1 Apr 2022 5:36] Tom Anderson
I also had the exact same problem. Vanilla install of MySQLWorkbench installed on Macbook Pro (2021). The error indicates that a necessary file was missing. So I checked the Frameworks directory that was being checked for `libmysqlclient.dylib`. There was no such file, only `libmysqlclient.21.dylib`. Therefore, the error is that the wrong filename is being used. I copied the `libmysqlclient.21.dylib` file with the expected name, and now the database migration wizard works fine.

```
tomanderson@adsl-172-10-1-217 ~ % ls /Applications/MySQLWorkbench.app/Contents/MacOS/../Frameworks 
Python3.framework		libcairo.2.dylib		libglib-2.0.0.dylib		libmforms.dylib			libmysqlcppconn.9.8.0.28.dylib	libpixman-1.0.dylib		libssh.4.8.7.dylib		libwbprivate.be.dylib		sql.parser.dylib
Scintilla.framework		libcdbc.dylib			libgmodule-2.0.0.dylib		libmtemplate.dylib		libparsers.dylib		libpng16.16.dylib		libssl.1.1.dylib		libwbpublic.be.dylib
WBExtras.framework		libcrypto.1.1.dylib		libgrt.dylib			libmysql.canvas.dylib		libpcre.1.dylib			libproj.19.dylib		libvsqlitepp.3.dylib		libwbssh.dylib
libantlr4-runtime.dylib		libgdal.28.dylib		libiconv.2.dylib		libmysqlclient.21.dylib		libpcrecpp.0.dylib		libsqlite3.so			libwbbase.dylib			libzip.5.3.dylib
tomanderson@adsl-172-10-1-217 ~ % cd /Applications/MySQLWorkbench.app/Contents/MacOS/../Frameworks
Frameworks % cp libmysqlclient.21.dylib libmysqlclient.dylib
```
[3 May 2022 20:58] Ora Sus
Tom Anderson's solution worked for me. Running MySQL Workbench 8.0.28 on MacBook Pro 2021 running MacOS 12.3.1. Copied libmysqlclient.21.dylib to libmysqlclient.dylib in the folder and the migration works for me now.
[31 Aug 2022 2:45] Minwoo Choi
This happens on my device too. and also the fixes suggested worked.
[17 Nov 2022 19:23] Marcel Folaron
Can confirm that the file does not exist on my end either.
Workbench 8.0.31
MacOS Monterey 12.2

Migration tool is looking for libmysqlclient.dylib but Frameworks only contains libmysqlclient.21.dylib. Copying and renaming the file fixed the issue.