Getting error while changing Default Directory of mysql data file (Facing issue on production, it is critically important)

Hi All, I tried to change the Default Directory of MySQL server and i set the directory from the different partition on ubuntu os.
for that, I referred to the following link:

But after changing the data directory path I am getting the error:

[Warning] Can’t create test file /media/user/HDD100gb/ash
[ERROR] failed to set datadir to /media/user/HDD100gb
[ERROR] Aborting

You probably need to adjust the file permissions onthe subdir

I have given permission but still facing same problem
chown -R mysql:mysql /media/user/HHD100gb

Perhaps you also need

chown -R +w

Yes i tried chown -R +w but still giving same error

Have a look at this article

1 Like

Hi did you managed to fix this? Experiencing the same.