I inherited a system running 2 instances of MySQL, on different ports. I don't see where you can set the port in the script. Do you just set the DBHOST=name:port?
I see these on the configure file:
# Set the port for the mysql connection
I think it is how you change the port number.