Why can I not connect my database in the JIRA Configuration Tool?

atal asian October 14, 2021

Hi,

 

I am trying to setup Jira for the first time, i've downloaded it and installed it on my pc. Ive created an SQL database called "connecttojira", set the collation to sql latin general cp437 ci ai, created a scheme and alter database to set read committed snapshot on. Made my way to the cmd and ran as admin, cd'd into the jira bin folder and config.bat in order to open up the JIRA Configuration Tool. 

Here I input all the database details:

I first set the Database type to: SQL Server (because im using sql server) then I input the connection details as follow:

Hostname: localhost, Port: 1433, Database: connecttojira, Username: sa, Password: (correct password) Scheme: dbo.

The problem I'm getting is that when I test connection with these settings I get an error saying "Could not connect to the DB: Cannot open database "connecttojira" requested by the login. The login failed."

When I type in the wrong credentials, obviously I get a wrong credential error message which means that my credentials are fine...

I'm at a loss on what to else I can do... Can anyone help me?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

Either the parameters you are entering for the connection are wrong, or the database is not configured to allow you to connect from the Jira server or process

I note you've used "localhost" in the parameters.  Are you really running the database service on the same machine as the Jira server?  (There's nothing wrong with doing that, but it's the first thing I'd check in the parameters)

atal asian October 14, 2021

Hi, My database is running on the same machine to where I have Jira installed.

What more do I need to do to my database to allow it to connect to jira? I've followed the steps in the documentations already... - https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-sql-server-2019-1063561670.html

am i missing something?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

You need to configure the database to allow the connection.

As you've confirmed the parameters for the connection are correct (one thing that used to be a bug was having spurious spaces in the connection string, but I think that was fixed ages ago and a newer Jira won't allow them), then there's nothing wrong in Jira.  The database is rejecting the login.  You might have something in the database logs to tell you why it rejected the attempt to log in.

atal asian October 14, 2021

I use that exact login details to log into my sql database all the time though, i've even tried to change the password and then entering the old password, it says that the password is wrong, but when i try the new password it works again and has the same error message T_T 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

Ok, but that doesn't tell us why your database is rejecting the log in.  You'll need to debug the database connection - why is it not letting you log in?

Suggest an answer

Log in or Sign up to answer