Jump to content

mysql script


Joshuaharry12

Recommended Posts

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

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 159 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use