I'm not sure but sending the port number as a string may be causing a problem.
My guess is at this point you're getting a CR_CONN_HOST_ERROR response error message.
Update
My guess was correct and not passing the port number as a string allowed me to connect to your remote MySQL server with the Script BASIC extension module.
include mysql.bas
dbh = mysql::RealConnect("sql8.freemysqlhosting.net","sql8183953","N9yUkvribn","sql8183953",3306)
PRINT "Host info is: ",mysql::GetHostInfo(dbh),"\n"
jrs@jrs-laptop:~/sb/examples/test$ scriba mysql_remote.sb
Host info is: sql8.freemysqlhosting.net via TCP/IP
jrs@jrs-laptop:~/sb/examples/test$
Here is an example of querying the MySQL information_schema tables.
IMPORT mysql.bas
dbh = mysql::RealConnect("sql8.freemysqlhosting.net","sql8183953","N9yUkvribn","sql8183953",3306)
mysql::query(dbh,"SELECT * FROM INFORMATION_SCHEMA.TABLES")
WHILE mysql::FetchHash(dbh,tbls)
FOR x = 0 TO UBOUND(tbls) STEP 2
PRINT tbls[x]," - ",tbls[x+1],"\n"
NEXT
PRINTNL
WEND
mysql::Close(dbh)