•Setup failed: System.Exception: An error occured when creating database: CREATE DATABASE permission denied in database 'master'.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hello,

I'm having a terrible time trying to get nopCommerce 2.50 source version to install on the WINHost site.

I deleted all files from my root folder on WINHost and uploaded contents of Deployable\nop_2.50 to website root folder using FTP two times and still get this error:

•Setup failed: System.Exception: An error occured when creating database: CREATE DATABASE permission denied in database 'master'. at Nop.Web.Controllers.InstallController.Index(InstallModel model) in c:\Users\Tony\VBProjects\LakesideCommerce\Presentation\Nop.Web\Controllers\InstallController.cs:line 387

I'm not sure of why it has a reference to my local C: drive on my development computer.  I ran the install from another computer that does not have VS2010, nopcommerce or any other files that i have on my development computer.  I don't know where it is getting that information.

I have nopCommerce 2.50 source version and followed these steps:

  1. Open source code in VS2010, Pro, SP1

  2. Build entire solution

  3. Execute the website and make sure everything works (Use CTRL-F5 in vs2010)

  4. Exit Visual Studio

  5. Run Prepare.bat without errors

  6. Run Deploy.bat without errors

  7. Upload contents of Deployable\nop_2.50 to website root folder using FTP

  8. Navigated to website in IE 9.0

  9. Filled in install screen with:

    Admin user email and password and checked "Create sample data"

    Selected radio button "Use an existing SQL Server (or SQL Express) database"

    Filled

    Checked "Create database if it doesn't exist"

    Selected radio button "Enter SQL connection values"

    Filled in SQL Server name and Database name

    Selected radio button "Use SQL Server account"

    Filled in SQL User name and SQL Password

Any help to resolve this issue would be gratefully appreciated.

Thanks,
Tony
11 years ago
Carneno wrote:
An error occured when creating database: CREATE DATABASE permission denied in database 'master'

Hi Tony,

The error is self-describing. You do not have permission to create a new database. I would suggest you contacting your hosting provider with a request to do it for you.
11 years ago
Hello a.m.

I did contact them.  Here is their reply.

I'm sorry, we would not be able to troubleshoot this error since its being thrown by the installer. Winhost application gallery does transfer of the installation files only, the actual installation is being handled by NopCommerce itself.

You will have to consult with NopCommerce side to see what is causing the error and how to resolve it. Iw ould also encourage you to post in our community forum and get peer support
forum.winhost.com

Thanks,
Tony
11 years ago
Please understand this this is not a nopCommerce issue. Database credentials that you're using do not have permission to create a database. Here is the issue. I don't know how exactly you asked WinHost staff to create a database, but I presume that you asked them to install nopCommerce for you. Ask them to create a database (that' all) and then use it (already created) during nopCommerce installation.

BTW, WinHost uses a control panel as any other hosting company. You can use it to create a database if you cannot get any support from your hosting provider. But I would suggest you contacting  WinHost one more time with a request to create a database (any hosting company does it for their customers if they ask for it)
11 years ago
a.m.,

I see what you are saying about not being a nopCommerce issue.

I did not ask Winhost to create a database.  I created the database using my control panel at Winhost.

I did not ask Winhost to install nopCommerce.  I uploaded all the files using FTP.  I thought I made that clear in this original post.

Are you saying that I should call Winhost and ask them to do it for me?  Somehow, I get the feeling that they are going to point me to the control panel documentation and tell me "here is how you do it".

Thanks,
Tony
11 years ago
Can anybody explain why the error in this post has a reference to my local C: drive on my development computer?

Thanks,
Tony
11 years ago
If you "created the database using my control panel at Winhost", then why did you ' Checked "Create database if it doesn't exist" '?   Don't Check that.  Just enter the existing Database name that you created.

Your C: drive is in the error message because that's where you compiled the program on your local PC.  I.e. the error message is referencing where the error is occurring in the source code.
11 years ago
Hello New York.

Well, I guess my interpretation of "Create database if it doesn't exist" is distorted.

I would think that it means that if the database is already there, then don't do anything during install to create a new database.  If i don't check that box, then yes, go ahead and create the new database.

You are implying that if I check that option, it tries to create a new database anyway, even though it already exists, and that is why I am getting that error.

I'm sorry.  I have to believe the error is caused by a security issue as a.m. explained.

I'm still puzzled as to why it would give information related to my compile machine.  Where is that information stored in the deployed code?

Thanks,
Tony
11 years ago
Yes, your interpretation is probably correct (I've never tried it).  My point was that if you explicitly created the db, then why chance using that option?  (i.e. what if you made a typo?)


The .pdb file contains the debugging information.  Wherever the project was compiled (and .pdb files created), those paths will appear in the stack trace.

Thus you (as developer) can see where the error is located.  In production, be sure to change settings in the web.config, so the stack trace is not presented to your customers.
11 years ago
BTW, do you have a SQL tool like SSMS?  And, does your host allow external access to the DB? (most do)
If so, then you can verify that the db is ok, and you can create a temp table, etc.
Also, did you ask your host exactly what db name to use?  Sometimes you need to use "localhost".
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.