SQL is the language used while calling a query
mysql_query("SQL CODE")
MYSQL is the "plugin-in" if you will, that allows interaction between the sql server / the user / the website VIA a server scripting language like (in this case) PHP
Example:
Header code:
CODE
<?php
$sql = mysql_connect("database","username","password")
$username = $_POST['username'];
$password = $_POST['password'];
mysql_select_db("my_db", $sql);
?>
SQL code:
CODE
<?php
$sql_query = "SELECT username FROM members WHERE username = '$username'"
?>
MYSQL Code:
CODE
<?php
$query_output = mysql_query($sql_query)
if($query_output['password']=$password)
{
setcookie("cookie_name","cookie data",time()+3600*24*30);
}
?>
Note: i assume your coding in php. and mysql/sql isnt restricted to JUST php...