well... is simple. to estabish a mysql connection use:
PHP Code:
mysql_connect("server","username","password"
to select a database:
PHP Code:
mysql_select_db("db_name"); 
to perform a mysql query:
PHP Code:
mysql_query("query string");