You need to specify the server version and type you are using, especially in your case, where you are using a very old (and unsupported) version of MySQL.
The easiest way to do this when adding migrations, is to implement the IDesignTimeDbContextFactory<TContext> interface in a class, that will only be used when running the ef core tools:
public class BloggingDesignTimeContextFactory : IDesignTimeDbContextFactory<BloggingContext>
{
public BloggingContext CreateDbContext(string[] args)
{
var optionsBuilder = new DbContextOptionsBuilder<BloggingContext>();
optionsBuilder.UseMySql(
"server=127.0.0.1;port=3306;user=root;password=;database=so62725308",
mySqlOptions => mySqlOptions
.ServerVersion(new Version(5, 5, 51), ServerType.MySql)); // <-- the server version
return new BloggingContext(optionsBuilder.Options);
}
}
CREATEcode.