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