diff --git a/Src/Asp.Net/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs b/Src/Asp.Net/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs index 7f2d81b5e..bc7a6370d 100644 --- a/Src/Asp.Net/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs +++ b/Src/Asp.Net/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs @@ -299,6 +299,12 @@ namespace SqlSugar /// public override bool CreateDatabase(string databaseName, string databaseDirectory = null) { + + if (this.Context.Ado.IsValidConnection()) + { + return true; + } + if (databaseDirectory != null) { if (!FileHelper.IsExistDirectory(databaseDirectory))