Moving connections and instances between two computers

前端 未结 8 808
日久生厌
日久生厌 2020-12-23 18:55

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 inst

8条回答
  •  死守一世寂寞
    2020-12-23 19:41

    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 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 output(length);
            memcpy(&output[0], outblob.pbData, outblob.cbData);
    
            return output;
    }
    

提交回复
热议问题