Um, you're not selecting the database to use. Add this after the connection, but before your SQL:
PHP Code:
$db = 'your_db';
mysql_select_db($db);
Like this:
PHP Code:
$username = 'username'; // mySQL username
$password = 'password'; // mySQL password
$host = 'localhost'; // mySQL host
// this is new
$db = 'your_db'; // mySQL db name
$link = mysql_connect($host,$username,$password) or die(mysql_error());
// this is also new
mysql_select_db($db);
$query = 'CREATE TABLE mycms ('.
'id INT NOT NULL AUTO_INCREMENT KEY'.
'username VARCHAR(10) NOT NULL, '.
'password VARCHAR(10) NOT NULL)';
$result = mysql_query($query);
Edit: Also, I didn't look through the rest of your mySQL, but once you have the DB selected, your mysql_error() output should be more telling if you still have errors.