How do we connect to a database server using any programming language using socket functions. I am thinking like the protocols. For example smtp, http, ftp, imap. we connect to these ports and we issue comands (execute commands). Like these is it possible to connect to a database server (the port is 3306) and can we issue commands which might execute various functionality like DDL, DML, TCL.
Since people say database server i thought of this like there should some possiblity to do to what i think instead of using programming language related sql functions like mysql_connect, mysql_select or mysql_query...
i would like to have suggestions, answers and references. may be i am not using the relevant search string in google to find information for this.