This is my first time using a database. I created an application using XAMPP via mySql localhost that contains tables from dbForge. I copied all the files and downloaded the latest 6.0 framework on another PC but it won't start and doesn't give any error message. Additionally, I can see in Task Manager that it opens for a few seconds and then closes.
Also, I tried it with a different application without mySql and the application started. What are some common mistakes I might make? I can provide more information if needed, but right now I don't know what to check.
Connect code blocks:
public class ApplicationDbContext : DbContext { public DbSet<Berletes> Berletesek { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { var connetionString = "Server=localhost; Database=foxgymapp; Uid=root; Pwd=;"; optionsBuilder.UseMySql(connetionString, ServerVersion.AutoDetect(connetionString)); } protected override void OnModelCreating(ModelBuilder modelBuilder) { } }
The problem you are encountering is that you are trying to access a database that does not exist.
You are pointing to a database in localhost hosted in your computer, you can run the same database on another computer or expose your database from your computer to another computer .