MySQL data files have been reporting errors since they were migrated

as the title: the system is Ubuntu 16.0464-bit, MySQL is 5.7Community Edition.
due to the default installation when installing MySQL, there is not enough disk space now, so I want to migrate the data file from / var/lib/mysql to / home/mysqldata,
after copying the data file to mysqldata with the cp command, modify the permission of mysqldata to mysql:mysql
then modify the configuration file and report an error when starting MySQL:
MySQL "ibdata1" must be writable.
then I changed the file permissions to 777, or reported the same error, what happened?

Mar.16,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb041e-22c1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb041e-22c1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?