The python script, run by cron, would have the privileges of the crontab owner's account.
You don't specify where the PHP script is, and by whom/what it is being run; as PHP is often run by the www server, if we assume that it is in this case, the web server user's privileges would not be the same as those of the crontab owner, most likely.
So, I could go out on a fairly well thought-out limb and say "nobody/www/daemon" doesn't have privileges to run mysql, but I could be wrong 😉
After all, you should be connecting with your username/password, right?