1. Registry
  2. Packages
  3. Dokploy
  4. API Docs
  5. MySQL
Viewing docs for Dokploy v0.3.1
published on Tuesday, Sep 29, 2026 by dimeskigj
dokploy logo Dokploy
Viewing docs for Dokploy v0.3.1
published on Tuesday, Sep 29, 2026 by dimeskigj

    A Dokploy MySQL database.

    Create MySQL Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MySQL(name: string, args: MySQLArgs, opts?: CustomResourceOptions);
    @overload
    def MySQL(resource_name: str,
              args: MySQLArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def MySQL(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              database_name: Optional[str] = None,
              database_password: Optional[str] = None,
              database_user: Optional[str] = None,
              environment_id: Optional[str] = None,
              name: Optional[str] = None,
              app_name: Optional[str] = None,
              database_root_password: Optional[str] = None,
              description: Optional[str] = None,
              docker_image: Optional[str] = None,
              environment: Optional[str] = None,
              external_port: Optional[int] = None,
              server_id: Optional[str] = None)
    func NewMySQL(ctx *Context, name string, args MySQLArgs, opts ...ResourceOption) (*MySQL, error)
    public MySQL(string name, MySQLArgs args, CustomResourceOptions? opts = null)
    public MySQL(String name, MySQLArgs args)
    public MySQL(String name, MySQLArgs args, CustomResourceOptions options)
    
    type: dokploy:MySQL
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "dokploy_my_s_q_l" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args MySQLArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MySQLArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MySQLArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MySQLArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MySQLArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var mySQLResource = new Dokploy.MySQL("mySQLResource", new()
    {
        DatabaseName = "string",
        DatabasePassword = "string",
        DatabaseUser = "string",
        EnvironmentId = "string",
        Name = "string",
        AppName = "string",
        DatabaseRootPassword = "string",
        Description = "string",
        DockerImage = "string",
        Environment = "string",
        ExternalPort = 0,
        ServerId = "string",
    });
    
    example, err := dokploy.NewMySQL(ctx, "mySQLResource", &dokploy.MySQLArgs{
    	DatabaseName:         pulumi.String("string"),
    	DatabasePassword:     pulumi.String("string"),
    	DatabaseUser:         pulumi.String("string"),
    	EnvironmentId:        pulumi.String("string"),
    	Name:                 pulumi.String("string"),
    	AppName:              pulumi.String("string"),
    	DatabaseRootPassword: pulumi.String("string"),
    	Description:          pulumi.String("string"),
    	DockerImage:          pulumi.String("string"),
    	Environment:          pulumi.String("string"),
    	ExternalPort:         pulumi.Int(0),
    	ServerId:             pulumi.String("string"),
    })
    
    resource "dokploy_my_s_q_l" "mySQLResource" {
      pulumi {
        replace_on_changes = [environment_id, server_id]
      }
      lifecycle {
        create_before_destroy = true
      }
      database_name          = "string"
      database_password      = "string"
      database_user          = "string"
      environment_id         = "string"
      name                   = "string"
      app_name               = "string"
      database_root_password = "string"
      description            = "string"
      docker_image           = "string"
      environment            = "string"
      external_port          = 0
      server_id              = "string"
    }
    
    var mySQLResource = new MySQL("mySQLResource", MySQLArgs.builder()
        .databaseName("string")
        .databasePassword("string")
        .databaseUser("string")
        .environmentId("string")
        .name("string")
        .appName("string")
        .databaseRootPassword("string")
        .description("string")
        .dockerImage("string")
        .environment("string")
        .externalPort(0)
        .serverId("string")
        .build());
    
    my_sql_resource = dokploy.MySQL("mySQLResource",
        database_name="string",
        database_password="string",
        database_user="string",
        environment_id="string",
        name="string",
        app_name="string",
        database_root_password="string",
        description="string",
        docker_image="string",
        environment="string",
        external_port=0,
        server_id="string")
    
    const mySQLResource = new dokploy.MySQL("mySQLResource", {
        databaseName: "string",
        databasePassword: "string",
        databaseUser: "string",
        environmentId: "string",
        name: "string",
        appName: "string",
        databaseRootPassword: "string",
        description: "string",
        dockerImage: "string",
        environment: "string",
        externalPort: 0,
        serverId: "string",
    });
    
    type: dokploy:MySQL
    properties:
        appName: string
        databaseName: string
        databasePassword: string
        databaseRootPassword: string
        databaseUser: string
        description: string
        dockerImage: string
        environment: string
        environmentId: string
        externalPort: 0
        name: string
        serverId: string
    

    MySQL Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MySQL resource accepts the following input properties:

    DatabaseName string
    The MySQL database name.
    DatabasePassword string
    The MySQL database password.
    DatabaseUser string
    The MySQL database user.
    EnvironmentId string
    The target environment ID.
    Name string
    The database resource name.
    AppName string
    The optional deployed database name.
    DatabaseRootPassword string
    The optional MySQL root password.
    Description string
    An optional database description.
    DockerImage string
    The MySQL Docker image.
    Environment string
    Environment variables for MySQL.
    ExternalPort int
    The optional externally exposed port.
    ServerId string
    The optional server ID.
    DatabaseName string
    The MySQL database name.
    DatabasePassword string
    The MySQL database password.
    DatabaseUser string
    The MySQL database user.
    EnvironmentId string
    The target environment ID.
    Name string
    The database resource name.
    AppName string
    The optional deployed database name.
    DatabaseRootPassword string
    The optional MySQL root password.
    Description string
    An optional database description.
    DockerImage string
    The MySQL Docker image.
    Environment string
    Environment variables for MySQL.
    ExternalPort int
    The optional externally exposed port.
    ServerId string
    The optional server ID.
    database_name string
    The MySQL database name.
    database_password string
    The MySQL database password.
    database_user string
    The MySQL database user.
    environment_id string
    The target environment ID.
    name string
    The database resource name.
    app_name string
    The optional deployed database name.
    database_root_password string
    The optional MySQL root password.
    description string
    An optional database description.
    docker_image string
    The MySQL Docker image.
    environment string
    Environment variables for MySQL.
    external_port number
    The optional externally exposed port.
    server_id string
    The optional server ID.
    databaseName String
    The MySQL database name.
    databasePassword String
    The MySQL database password.
    databaseUser String
    The MySQL database user.
    environmentId String
    The target environment ID.
    name String
    The database resource name.
    appName String
    The optional deployed database name.
    databaseRootPassword String
    The optional MySQL root password.
    description String
    An optional database description.
    dockerImage String
    The MySQL Docker image.
    environment String
    Environment variables for MySQL.
    externalPort Integer
    The optional externally exposed port.
    serverId String
    The optional server ID.
    databaseName string
    The MySQL database name.
    databasePassword string
    The MySQL database password.
    databaseUser string
    The MySQL database user.
    environmentId string
    The target environment ID.
    name string
    The database resource name.
    appName string
    The optional deployed database name.
    databaseRootPassword string
    The optional MySQL root password.
    description string
    An optional database description.
    dockerImage string
    The MySQL Docker image.
    environment string
    Environment variables for MySQL.
    externalPort number
    The optional externally exposed port.
    serverId string
    The optional server ID.
    database_name str
    The MySQL database name.
    database_password str
    The MySQL database password.
    database_user str
    The MySQL database user.
    environment_id str
    The target environment ID.
    name str
    The database resource name.
    app_name str
    The optional deployed database name.
    database_root_password str
    The optional MySQL root password.
    description str
    An optional database description.
    docker_image str
    The MySQL Docker image.
    environment str
    Environment variables for MySQL.
    external_port int
    The optional externally exposed port.
    server_id str
    The optional server ID.
    databaseName String
    The MySQL database name.
    databasePassword String
    The MySQL database password.
    databaseUser String
    The MySQL database user.
    environmentId String
    The target environment ID.
    name String
    The database resource name.
    appName String
    The optional deployed database name.
    databaseRootPassword String
    The optional MySQL root password.
    description String
    An optional database description.
    dockerImage String
    The MySQL Docker image.
    environment String
    Environment variables for MySQL.
    externalPort Number
    The optional externally exposed port.
    serverId String
    The optional server ID.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MySQL resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    MysqlId string
    The stable Dokploy MySQL ID.
    Status string
    The current MySQL deployment status.
    Id string
    The provider-assigned unique ID for this managed resource.
    MysqlId string
    The stable Dokploy MySQL ID.
    Status string
    The current MySQL deployment status.
    id string
    The provider-assigned unique ID for this managed resource.
    mysql_id string
    The stable Dokploy MySQL ID.
    status string
    The current MySQL deployment status.
    id String
    The provider-assigned unique ID for this managed resource.
    mysqlId String
    The stable Dokploy MySQL ID.
    status String
    The current MySQL deployment status.
    id string
    The provider-assigned unique ID for this managed resource.
    mysqlId string
    The stable Dokploy MySQL ID.
    status string
    The current MySQL deployment status.
    id str
    The provider-assigned unique ID for this managed resource.
    mysql_id str
    The stable Dokploy MySQL ID.
    status str
    The current MySQL deployment status.
    id String
    The provider-assigned unique ID for this managed resource.
    mysqlId String
    The stable Dokploy MySQL ID.
    status String
    The current MySQL deployment status.

    Package Details

    Repository
    dokploy dimeskigj/pulumi-dokploy
    License
    Apache-2.0
    dokploy logo Dokploy
    Viewing docs for Dokploy v0.3.1
    published on Tuesday, Sep 29, 2026 by dimeskigj

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial