Umbraco 10.5.1 connecting to local database when working locally
Hi
I am struggling to connect my Umbraco 10.5.1 (in specific) to a local database in my SQLServer.
I got an upgraded database which has all the content but when I tried to connect locally I was getting an error
"A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."
After few tries and changing the settings as per the error, I found that its looking for a DB file located in UmbracoProject\umbraco\Data\Umbraco.mdf.
So got the database file from SQL default location and copied it to the above file location. Now I was getting the error
"The database failed to install. ERROR: Database configuration is invalid. Please check that the entered database exists and that the provided username and password has write access to the database."
It took me pretty much 3-4 days and gone through all the knowledge base but dont find any help anywhere from Umbraco on how to connect to local database for an Umbraco 10 and above install.
All I can see was about how we can connect our local project to Umbraco Cloud which is not what I need.
Umbraco 10.5.1 connecting to local database when working locally
Hi I am struggling to connect my Umbraco 10.5.1 (in specific) to a local database in my SQLServer.
I got an upgraded database which has all the content but when I tried to connect locally I was getting an error "A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."
After few tries and changing the settings as per the error, I found that its looking for a DB file located in UmbracoProject\umbraco\Data\Umbraco.mdf.
So got the database file from SQL default location and copied it to the above file location. Now I was getting the error "The database failed to install. ERROR: Database configuration is invalid. Please check that the entered database exists and that the provided username and password has write access to the database."
It took me pretty much 3-4 days and gone through all the knowledge base but dont find any help anywhere from Umbraco on how to connect to local database for an Umbraco 10 and above install.
All I can see was about how we can connect our local project to Umbraco Cloud which is not what I need.
This was my local setup in the appsettings.json
I found this article earlier which is similar but instead I want to connect to local (external) database instead of Umbraco cloud database.
https://our.umbraco.com/forum/using-umbraco-and-getting-started/109924-umbraco-10-and-external-database-access-by-nuget-package-microsoftdatasqlclient
Can anyone please help if anyone come across this or Is Umbraco Cloud is the only option to connect to when we upgrade to any version above 9.
For the database connection with my hosting provider, using SQLServer 2016/2019, I use the connection string;
Just remove the "[]" and configure the values between them according to your database settings.
PS: "(localdb)\MSSQLLocalDB" in your connection string refers to the MDF file.
Thanks Wouter van de Weerd. That worked.
is working on a reply...