Friday, July 9, 2021

Ubuntu 20.04 – Cannot connect MySQL Workbench to MySQL server

An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.125" (uid=1000 pid=7944 comm="/snap/mysql-workbench-community/5/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.13" (uid=1000 pid=2044 comm="/usr/bin/gnome- keyring-daemon –daemonize –login" label="unconfined")

Please:

1 Check that MySQL is running on address localhost

2 Check that MySQL is reachable on port 3306 (note: 3306 is the default, but this can be changed)

3 Check the user root has rights to connect to localhost from your address (MySQL rights define what clients can connect to the server and from which machines)

4 Make sure you are both providing a password if needed and using the correct password for localhost connecting from the host address you're connecting from


Solved

$ sudo snap connect mysql-workbench-community:password-manager-service :password-manager-service

  • เพียงเท่านี้ mysql-workbench เราก็จะใช้งานได้ปกติ (ถ้าไม่มีข้อผิดพลาดอื่นๆ นะ)

Add

  • ในกรณีที่คำใช้คำสั่งด้านบนแล้ว error แบบนี้

error: snap "snapd" has "auto-refresh" change in progress

  • ให้เราใช้คำสั่งนี้ เพื่อดู package ที่มัน auto-refresh อยู่

 $ sudo snap changes  


  • มีรายการ ID=13 ที่ รอ update อยู่ ให้เราเปิดดูใน Ubuntu Software ว่ามี snap package บางตัวที่รออัพเดทอยู่

  • อัพเดทเรียบร้อยแล้วก็รันคำสั่ง ด้านบนใหม่อีกครั้ง

$ sudo snap connect mysql-workbench-community:password-manager-service :password-manager-service

Ref

  • https://askubuntu.com/questions/1242026/cannot-connect-mysql-workbench-to-mysql-server
  • https://itectec.com/ubuntu/ubuntu-cannot-connect-mysql-workbench-to-mysql-server/
  • https://forums.mysql.com/read.php?152,686820,686870#msg-686870
  • https://www.codegrepper.com/code-examples/typescript/mysql+workbench+an+apparmor+policy+prevents+this+sender
  • https://www.programmersought.com/article/10514316459/
  • https://askubuntu.com/questions/1167566/snap-not-allowing-me-to-remove-or-refresh-anything

No comments:

Post a Comment

Popular Posts