MySQL Workbench cannot store password on Linux

by Daniel Pham
Published: Updated:

MySQL Workbench cannot store password, if you’re facing this error, I hope this post may help you to resolve the problem.

The environment where I encountered this error was my personal computer using Zorin OS 16.

You may also get this error if you are using Ubuntu Desktop from Focal version onwards.

The error MySQL Workbench cannot store password

The error message look like:

Could not store password: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.327" (uid=1000 pid=14197 comm="/snap/mysql-workbench-community/9/usr/bin/mysql-wo" label="snap.mysql-workbench-community.mysql-workbench-community (enforce)") interface="org.freedesktop.Secret.Service" member="OpenSession" error name="(unset)" requested_reply="0" destination=":1.27" (uid=1000 pid=1738 comm="/usr/bin/gnome-keyring-daemon --daemonize --login " label="unconfined")

This error may happened when you try to store the database’s password with the button “Store in keychain”.

The message pop-up look like this.

MySQL Workbench cannot store password on Linux
MySQL Workbench cannot store password.

Why does this error occur?

Normally, snap packages are usually in the sandbox. And these software packages will be prevented by AppArmor from accessing services on the operating system.

How to fix the error?

This is quite simple, you open Terminal on your computer and switch to sudo or root privileges.

And then you type the following 2 commands to allow MySQL Workbench to connect to the password management service.In fact, you only need the first command, and the second command will be used in case you use SSH to connect to the database.

snap connect mysql-workbench-community:password-manager-service
snap connect mysql-workbench-community:ssh-keys

And if you want to disconnect from MySQL Workbench to the above 2 services, you just need to run the following 2 commands.

snap disconnect mysql-workbench-community:password-manager-service
snap disconnect mysql-workbench-community:ssh-keys

Conclusion

With just a few simple commands, you can fix the error and get MySQL Workbench working again.

5 5 votes
Article Rating

You may also like

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.

SUPPORT US

FOLLOW US

Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 DevOpsLite.com – All rights reserved.

Please write sources “DevOpsLite.com” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

2
0
Would love your thoughts, please comment.x
()
x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.