I am trying to use my flash drive to run mysql, i.e. I want to use my flash drive to do all the operations of mysql in place of hard disk. I have followed the document of digital ocean to move the mysql data directory mentioned here.
Ubuntu 16.04 LTS Flash Drive formatted to Ext4 Permission of the flash drive kept as 777 User group changed to mysql of the flash drive mysql Ver 14.14 Distrib 5.7.23, for Linux (x86_64) using EditLine wrapper
After following the exact steps, whenever I want to start the mysql service it throws me
**mysqld: Can't change dir to '/media/user_name/flash_drive_ID/mysql/' (Errcode: 13 - Permission denied)** **mysqld: 2018-08-10T07:50:41.588660Z 0 [Warning] Can't create test file /media/username/flash_drive_ID/mysql/user_name.lower-test** **mysqld: 2018-08-10T07:50:41.588782Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.23-0ubuntu0.16.04.1) starting as process 7929 ...** **systemd: mysql.service: Main process exited, code=exited, status=1/FAILURE**
Disclaimer: I already know the adverse effect of Wear Levelling but still hope to find a verbose solution as the requirement set is such.
If someone can explain what needs to be done here, it will be really helpful to me. All the solutions that exist in the web is not clearly stating what needs to be done.