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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 19 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