How to allow php access to /var/lib/mysql directory or the entire filesystem linux?

was the question
how to allow php access to /var/lib/mysql directory or the entire filesystem linux

scandir(/var/lib/mysql/admin_a1sdasdasd_top/): failed to open dir: Permission denied
July 8th 19 at 16:48
3 answers
July 8th 19 at 16:50
A list of databases to query to the database and tables also.

It does not have to scan the folder.
July 8th 19 at 16:52
to do SCR-dump is not possible in view of the huge size of the database files, so the decision was made to simply take the files in the archive and sync them to the host in the same folder (but via ssh)

now the only thing that came to mind - before access ctalogue where the database is stored to make her exec-> chown apache:apache with access to the files.

Start Apache PHP or root will not be possible as it runs from browser.
Under wine everything works., at the center of a security is prohibited. How to solve?
Other options?
Can I do this? :) - Jeanne54 commented on July 8th 19 at 16:55
well, it's not using php to do - bailee_Stant commented on July 8th 19 at 16:58
this is done with special software for backups. Just hire a normal admin, he will do. - Haley0 commented on July 8th 19 at 17:01
July 8th 19 at 16:54
and the permission is opened ? chmod of course , or maybe prevent htaccess

Find more questions by tags PHPApacheMySQLLinux