MySQL не разрешено для записи в файловую систему - PullRequest
0 голосов
/ 13 февраля 2020

Я использую сервер MariaDB на моей машине с Ubuntu mysql Ver 15.1 Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2. При попытке создать новую таблицу в пользовательском каталоге данных с DATA DIRECTORY='/home/myuser/ext', журнал ошибок MySQL сообщает мне

7f70acb77700  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.

mysqld работает как mysql пользователь:

PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
30450 mysql     20   0  695572 206208  16432 S   0,0  1,3   0:43.48 mysqld

каталог данных принадлежит mysql пользователь:

$ ls -l
drwxr-xr-x 4 mysql  mysql     4096 Feb 13 11:16 ext

владелец и права доступа к исходному датадиру:

$ ll /var/lib/mysql/
total 1355856
drwxr-xr-x  7 mysql mysql       4096 Feb 13 12:00 ./

apparmor, очевидно, не мешает. содержимое /etc/apparmor.d/usr.sbin.mysqld

# This file is intensionally empty to disable apparmor by default for newer
# versions of MariaDB, while providing seamless upgrade from older versions
# and from mysql, where apparmor is used.
#
# By default, we do not want to have any apparmor profile for the MariaDB
# server. It does not provide much useful functionality/security, and causes
# several problems for users who often are not even aware that apparmor
# exists and runs on their system.
#
# Users can modify and maintain their own profile, and in this case it will
# be used.
#
# When upgrading from previous version, users who modified the profile
# will be promptet to keep or discard it, while for default installs
# we will automatically disable the profile.

/etc/apparmor.d/local/usr.sbin.mysqld отсутствует.

У меня нет идей ... Что еще это может быть?

...