I found the problem.
When the databases created by AApanel gave privileges for user root only from localhost and not from 127.0.0.1
I had to do CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'your_password';
The problem is that the cron job for some reason is using the host "127.0.0.1" while the individual backup from "Databases" section is using the "localhost".
Please fix it for the other users than may have the same problem.