001package io.ebean.docker.commands; 002 003import java.util.Properties; 004 005public class MySqlConfig extends DbConfig { 006 007 public MySqlConfig(String version, Properties properties) { 008 this(version); 009 setProperties(properties); 010 } 011 012 public MySqlConfig(String version) { 013 super("mysql", 4306, 3306, version); 014 this.adminUsername = "root"; 015 this.adminPassword = "admin"; 016 this.setTmpfs("/var/lib/mysql:rw"); 017 } 018 019 /** 020 * Expose for MariaDB config. 021 */ 022 protected MySqlConfig(String platform, int port, int internalPort, String version) { 023 super(platform, port, internalPort, version); 024 } 025 026 @Override 027 public String jdbcUrl() { 028 return "jdbc:mysql://localhost:" + getPort() + "/" + getDbName(); 029 } 030 031 @Override 032 public String jdbcAdminUrl() { 033 return "jdbc:mysql://localhost:" + getPort() + "/mysql"; 034 } 035}