I have to admit that I am really confused after reading your last 2 posts.
Firstly, don’t understand why you tested connecting to the MySQL CDR server with another machine from another network? If the objective is to log from Asterisk to a remote CDR server, then the diagnosis should be conducted with the relevant systems to get the intended results.
I had not tried with MySQL, but had tested with PGSQL logging to a remote CDR in the same private subnet. Both hostname and ip worked IIRC with the conf file.
CDR logging are essentially inserts if I am not wrong. Therefore you should test sending insert queries with mysql client, from the Asterisk server to the remote CDR db, with the same credentials as you would with Asterisk. The problem could be with grants. If it’s working, then check if the cdr_mysql.so module is loaded with “show modules” from Asterisk cli. Check with “cdr status” next. Finally, you could use tools like tcpdump and ethereal to analyse the traffic during logging.
As mentioned earlier, “There are lots of possible reasons why logging fail”