This example shows how to create DB remotely using a server side programming language like "PHP". If you want to write mysql code, please follow the link. MYSQL

code to create and drop databases:

<?php

// Connect to our database
// ----------------------------------
$connect = mysql_connect("localhost", "root","")
or die("could not connect");
echo "CONNECTED TO ------";
$sql = "DROP DATABASE IF EXISTS wineprogect";
$create= mysql_query( $sql, $connect );
echo "database wineproject is dropped <br>";
$sql = mysql_query("CREATE DATABASE IF NOT EXISTS wineprogect") or die(mysql_error);
echo "database wineproject is CREATED";
?>

MySQL DB must reside in the same computer, if you are working with PHP and other tools in the same computer, you may try to use all the tools, but if you use "mysql_close();"  function at the end of your php script, you may have to connect to the database again.