Check this out it will automatically create a database http://help.tcadmin.com/Automatically_Create_a_MySQL_Database
from System import String
from TCAdmin.SDK.Mail import MailMessage
message = MailMessage()
message.AddTo(ThisUser.Email1)
message.Subject = "Your mysql database details"
message.TextBody = String.Empty
message.HtmlBody = String.Format("Ip: 0.0.0.0<br/>Port: 3306<br/>Database: {1}<br/>User: {1}<br/>Password: {2}<br/>You can access your database with phpMyAdmin from your control panel", ThisService.Variables["MySQLDatabase"], ThisService.Variables["MySQLUser"], ThisService.Variables["MySQLPassword"])
message.Send()
Script.WriteToConsole("MySQL Database details sent check you email");
Script.WriteToConsole("");
You can also user this IronPython code to send the use a email with there login details