Heh, mysql_query() all the way.
For creating a database:
$query = "CREATE DATABASE mydatabase";
mysql_query($query);
For creating a table:
$query = "CREATE TABLE myTable (id int not null auto_increment primary key, blah text, bleh text);";
mysql_query($query);