Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't create/write to file '/var/lib/mysql/aria_log_control'

Tags:

mysql

mariadb

Something is wrong. I stopped MaridaDB, moved /var/lib/mysql to a different place, then replaced the old mysql with a softlink

cd /var/lib
ln -s /data/mysql .

Then I added

chown -R mysql:mysql mysql

and then I went to /data and did the same (Note: this relocation works fine in regular mysql). But in MariaDB

ERROR] mysqld: Can't create/write to file '/var/lib/mysql/aria_log_control' (Errcode: 13 "Permission denied") [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/var/lib/mysql/aria_log_control' [ERROR] Plugin 'Aria' init function returned error. [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.

So what can I do to fix this? I tried setting

chmod 777 /var/lib/mysql/aria_log_control

but to no avail.

like image 517
user3021543 Avatar asked Oct 18 '25 14:10

user3021543


1 Answers

In my case the problem was that while directory mysql and files within were owned by user mysql, the path has a directory that lacked x bit for the users that are not in the correct group. In other words, user could not move to the target directory because one of the directories in the path did not allow it.

like image 109
Zds Avatar answered Oct 20 '25 06:10

Zds



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!