Arch LinuxではMariaDB/mysql_install_dbを設定できません。権限が拒否されました。

Arch LinuxではMariaDB/mysql_install_dbを設定できません。権限が拒否されました。

MariaDBの設定に問題があります。私はフォローアップをしています。アーチLinuxマリアデータベース|

Arch LinuxにMariaDBをインストールしました。sudo pacman -S mariadb

権限を持つ新しいフォルダを作成しました/mnt/local/int001/MEDIA/Personal/DB

drwxrwsr-x+ 1 mysql mysql                232 Jul 13 14:34  DB

datadir = /mnt/local/int001/MEDIA/Personal/DBに追加しました/etc/mysql/my.cnf

mysql私のユーザーをユーザーグループに追加します。sudo usermod -a -G mysql myuser

その後、提案どおりに実行しようとしましたが、次のsudo mysql_install_db --user=mysql --basedir=/usr --datadir=/mnt/local/int001/MEDIA/Personal/DBエラーが発生しました。所有権があってもなぜこれを得るのかがわかりますmysql

編集:権限を777に変更しましたが、違いはありません。

編集:私のシステムにはSELinuxの兆候はありません。

編集:ACLがありますが、親エントリから(そして再帰的に)削除しました。

編集:私はこのパスに変更し、SU mysqlこのパスのファイルを編集できます。

Installing MariaDB/MySQL system tables in '/mnt/local/int001/MEDIA/Personal/DB' ...

2018-07-13 14:52:02 140714278559680 [Note] /usr/bin/mysqld (mysqld 10.1.34-MariaDB) starting as process 12074 ...
2018-07-13 14:52:02 140714278559680 [ERROR] mysqld: Can't create/write to file '/mnt/local/int001/MEDIA/Personal/DB/aria_log_control' (Errcode: 13 "Permission denied")
2018-07-13 14:52:02 140714278559680 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/mnt/local/int001/MEDIA/Personal/DB/aria_log_control'
2018-07-13 14:52:02 140714278559680 [ERROR] Plugin 'Aria' init function returned error.2018-07-13 14:52:02 140714278559680 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: The InnoDB memory heap is disabled
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: Using Linux native AIO2018-07-13 14:52:02 140714278559680 [Note] InnoDB: Using SSE crc32 instructions
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: Completed initialization of buffer pool
2018-07-13 14:52:02 140714278559680 [Note] InnoDB: Highest supported file format is Barracuda.
2018-07-13 14:52:03 140714278559680 [Note] InnoDB: 128 rollback segment(s) are active.
2018-07-13 14:52:03 140714278559680 [Note] InnoDB: Waiting for purge to start
2018-07-13 14:52:03 140714278559680 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.39-83.1 started; log sequence number 1600627
2018-07-13 14:52:03 140713784243968 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-07-13 14:52:03 140714278476544 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't existERROR: 1  Can't create/write to file '/mnt/local/int001/MEDIA/Personal/DB/mysql/db.MYI' (Errcode: 13 "Permission denied")
2018-07-13 14:52:03 140714278559680 [ERROR] Aborting

ベストアンサー1

推測だけです。親ディレクトリに対する権限を軽減してみてください。しばらく前にこの動作を見たことがあります。私の記憶が正しい場合、この問題は「厳密な」権限が原因で発生しました。 2番目の推測です。パスに「末尾のスラッシュ」を追加してみましたか?

おすすめ記事