skip to Main Content

This is my first using a database. I’ve made an application that contains tables in dbForge through mySql localhost with XAMPP. I copied all my files and downloaded the latest 6.0 framework on the other PC, but it does not start, and it is not giving any error messages. Furthermore, I can see in the Task Manager that it opens for some seconds and then closes.

Also, I tried it with a different application without mySql and that application started. What common mistakes could I have? I can provide more information, if needed, but right now I can’t tell what should I be even checking.

The connection code block:

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)
    {
    }
}

2

Answers


  1. The problem you have is that you trying to access a database in that doesn’t exist.

    You are pointing to a DB in localhost, which is hosted in your computer, you would to run the same DB in the other machine or expose your DB from your computer to the other one.

    Login or Signup to reply.
  2. As we can see, this question has already been answered. Additionally, note that you need to configure two connections in the Studio and then apply Schema Compare or Data Compare (depending on your needs). You can find the information about these integrated features in the documentation:

    Schema Compare
    https://docs.devart.com/studio-for-mysql/comparing-and-synchronizing-database-schemas/synchronizing-two-schemas.html

    Data Compare
    https://docs.devart.com/studio-for-mysql/comparing-and-synchronizing-data-in-databases/setup-data-comparison.html

    The question of configuring servers is beyond our scope.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search