I'm installing mariadb on ubuntu 16.04.
After Installed, when I run mysql status/start, it always throws the below error
root@3ab94b27a215:~# service mysql status
/usr/sbin/mysqld: error while loading shared libraries: liblz4.so.1: cannot open shared object file: Permission denied
* MariaDB is stopped.
I find the file here
root@3ab94b27a215:~# find / -name liblz4.so.1
/usr/lib/x86_64-linux-gnu/liblz4.so.1
I set 777 permission to /usr/lib/x86_64-linux-gnu/liblz4.so.1
chmod 777 /usr/lib/x86_64-linux-gnu/liblz4.so.1
but still the error not resolved.
can you please help me on this?
This worked for me :-
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
It also disables the AppArmor for MySQL on the system though.
Got from this issue
This is what worked for me
Follow the steps below to remove mysqld from the app armor:
$ echo "/usr/sbin/mysqld { }" | sudo tee /etc/apparmor.d/usr.sbin.mysqld
$ sudo apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld
$ sudo systemctl restart mariadb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With