Moving connections and instances between two computers
Solution 1
I had the same questions. I found a MySQL directory in %APPDATA%. Copy the entire directory to the same location on the new machine. You'll need clear your passwords and re-enter them. Once I did that, I was up and running again.
You can find your %APPDATA% folder in Windows by entering it in the address bar of Windows Explorer.
Solution 2
You don't need to copy any files manually as other answers suggest. On both Windows and Mac you can export all your settings within MySQL Workbench and restore to another system.
Select Tools > Configuration > Backup Connections
This will export as a .zip. Then on your new new install just
Select Tools > Configuration > Restore Connections
That's it!
Solution 3
Found it on a mac in /Users/Username/Library/Application Support/MySQL/Workbench/
file called connections.xml
Solution 4
Backup and restore connections using the menus Tools > Configuration > Backup Connections and Tools > Configuration > Restore Connections is the easiest way, however it does not copy the passwords.
Extracting the passwords is possible in the following case:
- Old PC should be a Windows installation.
- You should be able to login using the Windows account who originally saved the passwords in Workbench, i.e. without having the Windows account's password reset by an admin.
If the above requirements are met, one can log into the old PC and run the decrypt tool found on http://www.donationcoder.com/forum/index.php?topic=41860.msg391762#msg391762
The C++ code to decrypt is shown below (credits: f0dder)
std::vector<unsigned char> decrypt(BYTE *input, size_t length) {
DATA_BLOB inblob { length, input };
DATA_BLOB outblob;
if (!CryptUnprotectData(&inblob, NULL, NULL, NULL, NULL, CRYPTPROTECT_UI_FORBIDDEN, &outblob)) {
throw std::runtime_error("Couldn't decrypt");
}
std::vector<unsigned char> output(length);
memcpy(&output[0], outblob.pbData, outblob.cbData);
return output;
}
Solution 5
In Linux (Ubuntu), the location was changed to $HOME/.mysql/workbench
Tested on Ubuntu 14.04 LTS.
Mr Rebel
Updated on July 05, 2022Comments
-
Mr Rebel almost 2 years
I´ve got a mysql-server that I´m administrate remotely with MySQL Workbench.
Now I´ve got a new computer and I cant find any solution to move my connections and instances-profiles to my new computer. This can´t be an unsolved question, huh? Not the first time this would happen for someone else.
Correction: It´s not the server-instances that I want to move. I need to export/move/backup my many client-profiles/instances-connections in MySQL Workbench.
-
Paul almost 11 yearsYou won't need the whole file, just connections.xml. You'll still need to enter in the passwords again for each connection.
-
Doug Davis almost 11 yearsThanks! I was able to copy the connections.xml and server_instances.xml from a PC to a Mac, and all my connections from the PC were then available on my Mac.
-
DrCord over 10 yearsIt doesn't look like you need to re-enter passwords anymore in version 6.0.8, awesome!
-
bjtilley over 9 yearsWindows 7 Location: C:\Users[user-name]\AppData\Roaming\MySQL\Workbench\ssh
-
Jonathan Gruber about 9 yearsOn Linux the configuration are in ~/.mysql/workbench/
-
Prometheus about 9 yearsThanks! This should be the top answer!
-
TheFrost about 9 years@DrCord apparently, in 6.3 need for re-entering password comes back.
-
DrCord about 9 yearsSuper lame they made you have to reenter passwords, this makes me not want to ever upgrade again, my work copy of MySQL workbench has so many passwords saved...
-
Valdogg21 almost 9 yearsDefinitely should be the top answer. Easy!
-
Edward about 8 years@ Spaceships , @Glyn Jackson hi, I wander that how to execute the command in the windows.Thanks
-
Magus over 7 yearssadly, it does not backup your passwords
-
thanassis over 5 yearsVerified on Ubuntu 18.04.1
-
user674669 over 5 yearsOn Mac OS X High Sierra & MysqlWorkbench 6.3, the file ~/Library//Application Support/MySQL/Workbench/connections.xml is empty.
-
Vlado almost 3 yearsWhat I got by trying this: Error during "Restore connections from a backup file". error calling Python module function PyWbUtils.restoreConnections
-
Lorenzo Belfanti almost 3 years@Vlado i have the same problem, Workbench version 8.0.25
-
Ryan almost 3 yearsFor me it was
gedit ~/snap/mysql-workbench-community/current/.mysql/workbench/connections.xml
on Ubuntu 20.04. -
Amir Khalil over 2 yearsThanks. Didn't even need to retype the passwords.
-
Forbidden over 2 years@Vlado Same issue. Looks like its been a bug since Feb 2021
-
DevWithZachary over 2 yearsPlease explain what your code is doing and why it answers the question
-
undefinedman over 2 yearsheh glad you wrote it :)