Bug #64053 MySQL workbench can't store password
Submitted: 17 Jan 2012 20:33 Modified: 23 Jan 2012 18:52
Reporter: Vitaliy - Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:MySQL Workbench CE 5.2.36 8542 OS:Linux (OpenSuSE 12.1 x86-64)
Assigned to: CPU Architecture:Any

[17 Jan 2012 20:33] Vitaliy -
Description:
Workbench does not store passwords in keychain. The debug log shows the following:
13:21:58 [ Debug2][ python context]: About to pyrun '/usr/share/mysql-workbench/sshtunnel.py'
13:21:58 [ Debug1][ mforms backend]: Looking up password for 'user'@'Mysql@server:3306' has failed
13:21:58 [ Debug1][ mforms backend]: Forgetting password for 'user'@'Mysql@server:3306
'Creating and showing password dialog
13:22:02 [ Debug1][ mforms backend]: Storing password for 'user'@'Mysql@server:3306'

The gnome keystore manager is running:
$ps -ef | grep gnome
1000      3133     1  0 09:10 ?        00:00:00 gnome-keyring-daemon -d
1000      7616  3402  0 13:32 pts/3    00:00:00 grep --color=auto gnome

How to repeat:
- Configure a connection
- Set password by clicking on "Store in Keychain ..." button.
- Click 'Test Connection' to verify it's working
- Close workbench.
- Reopen workbench and double-click on configured connection
[19 Jan 2012 15:22] Alfredo Kojima
How do you start the keyring? If you open Plugins -> Start Shell for MySQL Utilities and type
env | grep KEYRING
Do you get any output?
[19 Jan 2012 15:25] Alfredo Kojima
Also, what package are you using?
[20 Jan 2012 16:21] Vitaliy -
> How do you start the keyring?
From ~/.xinitrc :
export `gnome-keyring-daemon -d`

> If you open Plugins -> Start Shell for MySQL Utilities and type
> env | grep KEYRING
> Do you get any output?
$env | grep KEYRING
GNOME_KEYRING_CONTROL=/tmp/keyring-QbylOs
GNOME_KEYRING_PID=3133
$ls -la /tmp/keyring-QbylOs
total 20
drwx------  2 user      users  4096 Jan 17 09:10 .
drwxrwxrwt 42 root      root  16384 Jan 20 09:18 ..
srwxr-xr-x  1 user      users     0 Jan 17 09:10 control
srwxr-xr-x  1 user      users     0 Jan 17 09:10 gpg
srwxr-xr-x  1 user      users     0 Jan 17 09:10 pkcs11
srwxr-xr-x  1 user      users     0 Jan 17 09:10 ssh
$ps -ef | grep 3133
1000      3133     1  0 Jan17 ?        00:00:00 gnome-keyring-daemon -d
[20 Jan 2012 16:26] Vitaliy -
> Also, what package are you using?
$rpm -qi $(rpm -qf `which mysql-workbench`)
Name        : mysql-workbench
Version     : 5.2.36
Release     : 38.1
Architecture: x86_64
Install Date: Sat 14 Jan 2012 12:15:17 PM MST
Group       : Productivity/Databases/Clients
Size        : 51691783
License     : GPLv2+
Signature   : DSA/SHA1, Mon 12 Dec 2011 04:02:06 AM MST, Key ID 562111ac05905ea8
Source RPM  : mysql-workbench-5.2.36-38.1.src.rpm
Build Date  : Mon 12 Dec 2011 03:49:44 AM MST
Build Host  : build09
Relocations : (not relocatable)
Vendor      : obs://build.opensuse.org/server:database
URL         : http://dev.mysql.com/downloads/workbench
Summary     : A MySQL visual modeling tool
Description :
MySQL Workbench provides DBAs and developers an integrated tools environment
for:
 * Database Design & Modeling
 * SQL Development (replacing MySQL Query Browser)
 * Database Administration (replacing MySQL Administrator)
Distribution: server:database / openSUSE_12.1

Repository: http://download.opensuse.org/repositories/server:/database/openSUSE_12.1/
[20 Jan 2012 17:05] Alfredo Kojima
That package is not ours, it's an important detail.
We can't debug the issue, but if you're willing, you can build their package yourself, send the complete build logs and then try debugging the code to see if it's actually trying to use the keyring.
[21 Jan 2012 0:18] Vitaliy -
With self-compiled package from http://dev.mysql.com I can't connect to any of the servers at all. Workbench just sits there for 15 seconds then brings dialog hidden behind main window saying:
Error communicating with gnome-keyring-daemon

Then:
forget_password Error communicating with gnome-keyring-daemon

And never prompts me for a password.

Log file says the same thing.
[23 Jan 2012 18:52] Vitaliy -
Apparently gnome-keyring-daemon either doesn't start properly from ~/.xinitrc or doesn't respond to communication.

If started manually and correct env vars exported mysql-workbench starts to communicate with it.

You can close it as invalid.

Might want to open a different bug for not being able to enter password when workbench fails to communicate to keyring daemon,