How do I change options file (my.ini) location for Windows?

Viewed 608

The location of the options file is greyed out in

Database/Manage Connections/Local instance MySQL80/System Profile/Configuration file

My options file is located elsewhere. How do I change this?

Screenshot of Problem

2 Answers

The file 'server_instances.xml' must be edited to reflect the location of the options file. We can locate this file ourselves, as it's usually in our roaming user profile. Edit the line starting with '<value type="string"key="sys.config.path"' to reflect the options file location. Alternately we can:

  1. Open MySQL Workbench 8.0 CE from the 'Start' menu
  2. Connect to the database
  3. Select Tools/Configuration/Backup Connections
  4. Choose a file name and save the file.
  5. Open the archive (I used 7-Zip)
  6. Open the file 'server_instances.xml' within the archive (I used Notepad++)
  7. Look for the line starting with '<value type="string" key="sys.config.path"'
  8. Edit the value to reflect the full path and file name of your configuration file
  9. Save your edit back to the archive
  10. Select Database\Manage Connections
  11. Select the database ('Local instance MySQL80' in my case) and delete the connection (Button under the list of connections)
  12. Select Tools/Configuration/Restore Connections
  13. Open the modified archive (using mySQL Workbench 8.0)

You should see the updated location in Database/Manage Connections/Local instance MySQL80/System Profile/Configuration File.

Can be that upgrading to MySQL Server 8.0 from several versions resulted in old values remaining unchanged in the

%AppData%\Roaming\MySQL\Workbench\server_instances.xml

on my machine is c:\Users\<user>\AppData\Roaming\MySQL\Workbench\server_instances.xml Please open that file and try to search sys.config.path.lock and change value from 1 to 0 or remove that xml entry. restart workbench and you should be able to edit that path.

Related