Using dreamhost api

do they have an api for creating a new mysql database or granting an existing mysql user to create a database ?

the wiki is your friend: http://wiki.dreamhost.com/API/Mysql_commands