NOTE: Special thanks to Toad for MySQL user and 'friend of the product' Daniel Page who contributed this document. You can learn more about Daniel on his LinkedIn page . “Toad for MySQL” is an excellent tool and a HIGHLY recommended replacement for the SQL query engine of choice to replace the query portion of the MySQL Workbench. It has far greater functionality and ease of use than the OOB MySQL Workbench query functionality (personal opinion of course!), enabling both geek (no offense I count myself as one.. and PROUD of it) and non-geeks to effectively use MySQL data sources in their work. However, many users, for many versions of MqSQL in the past few years have had some initial problems getting up and running (I did, with multiple versions of Toad). This doc explains the issue and how to get it fixed so you can use Toad to work with your MySQL DBs. When launching Toad for MySQL after a successful installation and attempting to connect to MySQL DB instances the user will many times encounter an error with the version of a critical module, the MySQL connector “main” dynamic link library (.dll) “MySQL.data.dll”. This problem is caused by the following factors: The MySQL database installation / update process updates the MS Global Assemblies Cache (GAC) with the latest version of the native MySQL connectors . The MySQL assembly key for MS GAC is “c5687fc88969c44d”. This key is used to identify the available version of the MySQL connector currently available to downstream programs regardless of the actual version(s) installed at any given time (older versions are still present but have no unique key to ID them). Unfortunately this results in an issue for “Toad for MySQL” post installation. Toad for MySQL uses a XML configuration file, “Toad.exe.config” to specify the component dependencies it requires to execute. This file references both the MS GAC key noted above, BUT also explicitly calls out the version of “MySQL.data.dll”. When the version of “MySQL.data.dll” declared in the “Toad.exe.config” and the version available from the MS GAC via the key due not match, “bad things happen here” and Toad for MySQL cannot connect to the DB and throws a sequence of two error messages. The result of this issue is shown below: This problem can be resolved via the following manual work-around: Determine the version of the MySQL connector currently installed on your system by searching for the key in the MS Win file manager. A search will return the following: WRITE DOWN the version of the “MySQL.data.dll” that the MySQL install/update process has registered with the MS GAC for both MS.NET and Win. In the example above it is “6.9.8.0”. Next we need to update the “Toad for MySQL” configuration to remove the “MySQL.data.dll” version mismatch between the MS GAC version and the version present in the “Toad.exe.config” XML file used by Toad for MySQL. The file is located in the installation directory for the version of “Toad for MySQL” you are using. In my case that directory is: “C:\Program Files (X86)\Dell\Toad for MySQL Freeware 7.X\Toad.exe.config”. Replace the drive letter and the Toad version installation directory as required for your version of Toad. Once you have located the file it is recommended to create a backup copy of the original BEFORE you edit it. Fire up your favorite text editor (note a plug – I use the EXCELLENT NotePad++ freeware editor – a fabulous tool for MS Win programming!) and open the “Toad.exe.config” XML file for editng. Searching for “MySQL.data” you should see something very similar to the following: Note the THREE version text strings: “codebase version=’X.X.X.X’ “, “oldVersion=’0.0.0.0-X.X.X.X’ ”, and “newVersion=’X.X.X.X’ “. It is these strings that we will update. NOTE: I expect that the “codebase” and “newVersion” are intended to provide functionality that supports “Toad for MySQL” being able to dynamically load the correct version, however since that obviously does not work (else we would not be here), AND since, apparently, MySQL / MS GAC do NOT support multiple versions of MySQL connector assemblies and “fallback” logic updating all three poses no issue that I have seen in usage. Refer to the information for your currently installed version of that you wrote down in the step above. The updates executed are shown in the “after” version as follows: Note that the ONLY modifications made were to the text strings for the version. Save the updated version of “Toad.exe.config” (in the same directory you found it of course). Fire up your updated version of “Toad for MySQL” and attempt the DB connection that got you here in the first place. You should see a success! NOTE: If you update either your MySQL server instance OR your MySQL client AND the version of the MySQL connector is updated it is HIGHLY likely you will have to repeat this process… SO save these instructions someplace!
↧