Moving connections and instances between two compu

2019-01-31 11:01发布

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.

8条回答
该账号已被封号
2楼-- · 2019-01-31 11:25

I found the file "WbProfiles.xml" in path C:\Users\.sqlworkbench\WbProfiles.xml

Either copy the file or copy complete ".sqlworkbench" folder under same path in new machine.

查看更多
神经病院院长
3楼-- · 2019-01-31 11:31

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

Linux MySQL Workbench Backup/Restore Connections

That's it!

查看更多
成全新的幸福
4楼-- · 2019-01-31 11:31

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:

  1. Old PC should be a Windows installation.
  2. 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;
}
查看更多
Juvenile、少年°
5楼-- · 2019-01-31 11:33

In Linux (Ubuntu), the location was changed to $HOME/.mysql/workbench

Tested on Ubuntu 14.04 LTS.

查看更多
你好瞎i
6楼-- · 2019-01-31 11:36

just copy them!

in Linux, they're at $HOME/.mysqlgui/

查看更多
时光不老,我们不散
7楼-- · 2019-01-31 11:39

Found it on a mac in /Users/Username/Library/Application Support/MySQL/Workbench/

file called connections.xml

查看更多
登录 后发表回答