Bug #62279 Error while storing password in keychain
Submitted: 28 Aug 2011 18:24 Modified: 5 Sep 2012 23:06
Reporter: Jorge Mariani Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.34, 5.2.35, 5.2.37 OS:MacOS (10.7.1)
Assigned to: CPU Architecture:Any
Tags: password

[28 Aug 2011 18:24] Jorge Mariani
Description:
Trying to store a password inthe keychain while trying to synchronize a model in the EER Diagram produces an error:

Store Password
Could not store password: Error deleting password entry: The operation couldn’t be completed. (OSStatus error 0.)

How to repeat:
Open an EER Diagram
Select Database>Synchronize Model
Select a remote database.
Click on "Store in keychain..."
Enter password.
Click Ok.
[5 Sep 2011 16:19] Pierre GANDON
I'm experiencing the same problem on Mac OS X Lion, with the last version (mysql-workbench-gpl-5.2.34-osx-i686). I even tried to delete my ~/Library/Application Support/MySQL/workbench directory, but it didn't fix the problem, when adding a new connection, I click "test connection" and first of all it's asking me for my SSH password (but I clicked on "store in keychain" and stored the password in the config), then it's showing me this dialog (checkbox "store in key chain" checked or not):
"Error Looking Up Password"
"Error deleting password entry: The operation couldn’t be completed. (OSStatus error 0.)"
[5 Sep 2011 16:24] Pierre GANDON
Screenshot of the error

Attachment: Capture d’écran 2011-09-05 à 18.23.57.png (image/png, text), 130.61 KiB.

[9 Sep 2011 17:04] jose wilker
any solution for this problem ?
[9 Sep 2011 19:26] Srihari Venkatesan
I am facing the same problem, but with opening a new connection. Is there any suggested solution?
[10 Sep 2011 0:31] jose wilker
Hello, recently I post a same problem with connections in mysql workbench, in the beta repository has a version 5.2.35... I install this fix and my problems are solved.

here a link with the new version I downloaded and installed.

http://85.131.152.46/8cb10dd42cdf2d2b43cb9e0f0386baaeff5dd462

att,

JW
[5 Oct 2011 9:52] Valeriy Kravchuk
Jorge,

Please, check if 5.2.35 solves the problem for you also.
[3 Nov 2011 21:16] Rob Sherman
Have the same problem with 5.2.35 7915 on Mac OSx Lion.  I can't create a new instance on a remote IP and save password to keychain.  I get the exact same errors as reported above.
[13 Nov 2011 23:27] Marcel Kalveram
I am also running 5.2.35 on Mac OS Lion and have the same issue.
At this moment I am not able to sync models between my local and remote servers because of this.

I would be very happy to see a bug fix or workaround for this soon.
[14 Nov 2011 16:01] Jay Fidlow
having the same issue with 5.2.35 on lion.  Getting the same "Error Looking Up Password"
"Error deleting password entry: The operation couldn’t be completed. (OSStatus error
0.)" error mentioned above.  Tried setting up a config file with an entry in the form
Host {nickname}

User {username}
Port 22 
HostName {hostname}
IdentityFile {path} 
TCPKeepAlive yes 
IdentitiesOnly yes
 
in ~/.ssh/config and setting up the connection with a hostname and no username/pw but I get a timeout error.  I successfully tested the host entry via terminal and Panic's Transmit.  Maybe editing the placeholders in the connections.xml file as a possible workaround?  Thoughts?
[15 Nov 2011 0:06] Alfredo Kojima
Are you able to sync if you don't select to store the password in the keychain?
[25 Nov 2011 12:54] Magno Gouveia
I had the same problem, and I used the Keychain Access.app to remove the old password, after this, I could save the new password.

I'm using Mac OS X Lion and MySQL Workbench 5.2.35 Revision 7915.

I hope this was usefull.

tks
[4 Dec 2011 18:41] Marcel Kalveram
Thanks, Magno.
I have been able to solve the problem removing the old password through the Keychain app.
[6 Dec 2011 16:36] Steve Rogers
I am seeing this also on Lion 10.7.2 with MySQL Workbench 5.2.36 (8542).  I made a typo in the DB name on the very first connection - after that, it gets an error on trying to add or trying to remove the password so you're totally locked out of the app.  Deleting the keys with Keychain Access got me past it.
[6 Dec 2011 17:17] Chuck van der Linden
Similar issue with LION 10.7.2  and workbench 5.2.35 Rev7195  I was eventually able to get the password to save by deleting it from the keychain utility, using test connection, and specifying it at that time (and telling it to save in the keychain)

Then later I started getting the same cannot delete password error that others are reporting (strange since I never told it to remove the password) and am back stuck in the same place.  

It seems that any attempt to maintain the established password, or to set it via clicking on 'store in keychain' in the manage connections UI will fail.  It seems the only way to set it is clear the keychain entry from the keychain tool and set it via 'test connection'.
[22 Dec 2011 8:42] Kenrick Zhou
i have the same problem with "New Connection" and "New Server Instance"

I'm using Mac OS X Lion 10.7.2 and MySQL Workbench 5.2.35 Revision 7508.
[20 Jan 2012 16:27] James Smith
Having the same problem on 5.2.37 r8576  OS X Lion

Was able to setup three connections, but data entry on one of them.  Tried to fix it, but get this same error.   Deleting from keychain app didn't fix for me.
[21 Jan 2012 22:18] Matt Akers
Screenshot

Attachment: Screen Shot 2012-01-21 at 3.17.17 PM.png (image/png, text), 128.67 KiB.

[21 Jan 2012 22:18] Matt Akers
I can confirm this is still a bug with WB 5.2.37 and OS X Lion 10.7.2
[1 Feb 2012 22:40] David Marwick
I had a similar experience as Chuck van der Linden, on Lion 10.7.2 and Workbench 5.2.37 r8576. Seems like the problem is storing the password in Keychain outside of a flow in which you are connecting to the server.

I defined a new connection and chose Store In Keychain before connecting to the server, and got the aforementioned error message. I was able to get around it for now by deleting the Keychain entry, restarting Workbench, editing the connection, choosing Test Connection, entering the pswd and ticking the checkbox to save in Keychain.
[3 Feb 2012 14:05] Dominic Foti
Same issue on Lion 10.7.2 running Workbench 5.2.37.
[6 Feb 2012 13:26] Alfredo Kojima
Please try with latest version of Lion. This appears to be a Lion bug.
[6 Feb 2012 19:37] Shefik Macauley
Problem still persists with the latest version of Lion (10.7.3) and Workbench (5.2.37).
[7 Feb 2012 15:35] Shefik Macauley
I am already using the latest version of Mac OS X (Lio) - version 10.7.3, and the problem still persists.
[12 Mar 2012 16:39] Wes Dean
I had some luck avoiding  the keychain and using a ssh key file.
[12 Mar 2012 16:40] Wes Dean
I had some luck avoiding the keychain and using a ssh key file instead.
[27 Mar 2012 9:10] Valeriy Kravchuk
Had anybody seen this on 10.7.3+ with MySQL Workbench 5.2.38?
[28 Mar 2012 21:12] Benjamin Guillet
Yes, same bug with Lion 10.7.3 et workbench 5.3.38. Resolved with the Keychain Access.app trick
[28 Mar 2012 22:19] Mike Reid
Benjamin, what Keychain trick are you referring to?
[28 Mar 2012 22:21] Benjamin Guillet
To use the Keychain Access.app to remove the old password, and after this, save the new password with MySQL Workbench.
[28 Mar 2012 22:21] Mike Reid
Oops! Nevermind, I see it referenced in David's post above. (My apologies)
[2 Apr 2012 16:55] code junky
Just go to your Applications / Utilities and under their is the Keyword Access Tool. Delete the bad password and then attempt to access again. This will at a minimum reset the issue with the "can't delete password error"
[26 May 2012 16:14] Alfredo Kojima
Does Preferences -> Keychain First Aid in the Keychain Access app solve the problem?
[26 May 2012 16:14] Alfredo Kojima
Does <Keychain Access> -> Keychain First Aid in the Keychain Access app solve the problem?
[2 Jun 2012 16:53] David Pond
Running 5.2.40, I can reproduce this easily. Just create two DB connections that point to the same host/username/password, but with different default schemas. Storing the password in the keychain for the first one works fine, and fails for the second. You can go look in Keychain Assistant and see that there is one entry. If you delete it and attempt to store the password for the second db connection, it will succeed. But it will fail when you go back and try to add a password to the first connection.

At some point this worked fine. On another system where I already have this working, looking in Keychain Assistant you see that there are multiple entries for the same connection (e.g., Mysql@<dbhost>:3306), but this newer version seems to have problems creating those.
[18 Jun 2012 16:30] Christopher Burns
Still a problem for me as well, running OSX Lion (10.7.4) and MySQL Workbench 5.2.40.

I was able to create a connection one time, saving the password in the keychain, but every time I try to open the connection I get the "Error Looking Up Password" error.

If I delete the connection, and delete the Keychain entry, then re-create the connection, saving the password to the Keychain, I see the entry appear in the Keychain, but the connection fails with the same error.

If I delete the connection and the Keychain entry, then re-create it but do not save to the Keychain, it works, but as soon as I try to open the connection I get the error.

Make MySQL Workbench useless for me.  Would love to see this fixed as I could really use this tool for my current project.
[29 Jun 2012 13:11] Mike Lischke
@all, it's difficult to reproduce this error. It seems to happen only to certain people (special machine configurations? we don't know). So I would like to ask for volunteers who I could send a new dylib containing the pw handling with better error reporting, so the hope is we get a better description of what is going on on these machines.

Send a mail to mike.lischke@oracle.com if you like to test.
[30 Jun 2012 21:35] Jingjing Wang
keychain solved the problem for me.
[30 Jun 2012 21:37] Jingjing Wang
keychain solved the problem for me.
[25 Jul 2012 15:00] Valeriy Kravchuk
All reporters,

Please, check if the same problem still happens with a newer version of Workbench, 5.2.41, on a recent versions of Mac OS X 10.7.
[15 Aug 2012 14:19] Balint Pelhos
It seems that the bug is solved. I tested it with Workbench 5.2.42 (Revision 9752) and Mac OS X 10.7.4.
Thanks for the effort of every developer.
[19 Aug 2012 14:19] Valeriy Kravchuk
Not repeatable with 5.2.42 any more. Looks fixed.
[5 Sep 2012 23:06] Philip Olson
Fixed as of the upcoming Workbench 5.2.42, and here's the changelog entry:

 On Mac OS X, attempts to store a password into the keychain
 could result in an error. 

Thank you for the report.
[9 May 2017 9:49] Valentin Gjorgjioski
Hi, just hit the same problem in 6.3. version.
[9 Jul 2018 22:14] Chase Clifford
using 6.3.10 on mac and experiencing this issue can anyone mention a stable version without this issue?