If you ever happen to see:
mysql> install plugin handlersocket soname 'handlersocket.so';
ERROR 1126 (HY000): Can't open shared library '/usr/lib/mysql/plugin/handlersocket.so' (errno: 2 failed to map segment from shared object: Permission denied)
Just check your /var/log/syslog for messags like:
operation="file_mmap" pid=12750 parent=12354 profile="/usr/sbin/mysqld" requested_mask="::m" denied_mask="::m" fsuid=105 ouid=0 name="/usr/lib/mysql/plugin/handlersocket.so.0.0.0"
That is a problem with apparmor configuration, the good news - you don't need to stop apparmor to run handlersocket in Ubuntu, you only need to add permissions to your /etc/apparmor.d/abstractions/mysql
Now my config looks like:
#some comments
/var/lib/mysql/mysql.sock rw,
/usr/share/mysql/charsets/ r,
/usr/share/mysql/charsets/*.xml r,
/usr/lib/mysql/plugin/handlersocket.so* mr,
You also need to reload apparmor profiles as the first google-link suggests:
sudo invoke-rc.d apparmor reload
And plugin works OK:
mysql> install plugin handlersocket soname 'handlersocket.so';
Query OK, 0 rows affected (0.01 sec)
No comments:
Post a Comment