Migrate the ABC database from SQLSERVER to MySql, abpsqlserver

Source: Internet
Author: User

Migrate the ABC database from SQLSERVER to MySql, abpsqlserver

Abstract: I learned a little bit about the ABC after some online tutorials. Recently, I want to migrate the default SQLSERVER data to mysql.

First, search online

Install MySql. Data. Entity

Then you need to install MySql. Data. Entity and MySql. Data to your. EntityFramework and. WebProject. Then you need to modify. WebThe web. config file of the project.

Open your DbContext Configuration class (Configuration. cs) and use the following code in the constructor of this class:

SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
Configure the connection string

To be able to use the MySQL database, you need to modify the connection string in the web. config file. As follows:

<add name="Default" connectionString="server=localhost;port=3306;database=sampledb;uid=root;password=***" providerName="MySql.Data.MySqlClient"/>
Regenerate the migration File

When downloading the launch template, if you select includeModule Zero. Some migration files will be included in your project, but these files are used for SQL Server migration. Open. EntityFrameworkThe Migrations folder in the project, and then delete these migration files. The migration file starts with a timestamp. The migration file name is as follows:20150621_461__abpzero_initial.

After deleting all migration files, select your. WebProject is the start project. Open the VS package management console and select. EntityFrameworkProject as the default project. Then, run the following command on the console:

Add-Migration "AbpZero_Initial"

Now you can use the following command to create a database:

Update-Database

I. OK according to the above operations, the following problems have occurred in Nanni.

No useful content is found in various searches on the Internet. Finally, google got a related content

Is it the latest version. Decisive version downgrade to 6.8.8 does not cause any further violation of security rules.

Versions 6.8.8 and 6.9.10 are correct.

The above is the first pitfall I step on.

2. The following is The provider did not return a ProviderManifestToken string .. Habitually search for another wave. I found everything I said online .. Let's interrupt it and see innerexception. Information in innerexception

Access denied. Is the password wrong... The password is wrong (no way. Well, I installed mysql. I used it once and then I had to eat it ..)

 

 

Last update-database.

 

Above... Comments and corrections

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.