there should be ok with suPHP or not -- when you run in command line, you run as root, no privilege problem.
I think there is no trick -- please forcus on the error message:
while I'm writing, I found
should be
#mysql -h my.remotesql.com -u myuser -p
if this command succeeds, test_mysql.php...