A database connection is a facility that allows client software to communicate with database server software, whether on the same machine or not. A connection is required to send commands and receive answers.
Questions tagged [database-connection]
7147 questions
636
votes
9 answers
What is the format for the PostgreSQL connection string / URL?
What is the format for the PostgreSQL connection string (URL postgres://...) when the host is not the localhost?

JII
- 6,457
- 3
- 19
- 9
535
votes
28 answers
MySQL Error: : 'Access denied for user 'root'@'localhost'
Consider:
./mysqladmin -u root -p** '_redacted_'
Output (including typing the password):
Enter password:
mysqladmin: connect to server at 'localhost' failed error:
'Access denied for user 'root'@'localhost' (using password: YES)'
How can I fix…

Harsh Trivedi
- 5,591
- 3
- 12
- 14
504
votes
55 answers
Cannot Connect to Server - A network-related or instance-specific error
I get the following error when trying to connect to SQL Server:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is…

Sasa Shree
- 5,235
- 3
- 13
- 3
385
votes
5 answers
How to list active connections on PostgreSQL?
Is there a command in PostgreSQL to select active connections to a given database?
psql states that I can't drop one of my databases because there are active connections to it, so I would like to see what the connections are (and from which…

Tregoreg
- 18,872
- 15
- 48
- 69
361
votes
19 answers
Warning about SSL connection when connecting to MySQL database
With the two classes below, I've tried connect to a MySQL database. However, I always get this error:
Wed Dec 09 22:46:52 CET 2015 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL…

Milos86
- 3,621
- 3
- 12
- 5
356
votes
13 answers
How do I manage MongoDB connections in a Node.js web application?
I'm using the node-mongodb-native driver with MongoDB to write a website.
I have some questions about how to manage connections:
Is it enough using only one MongoDB connection for all requests? Are there any performance issues? If not, can I setup…

Freewind
- 193,756
- 157
- 432
- 708
334
votes
36 answers
PG::ConnectionBad - could not connect to server: Connection refused
Every time I run my rails 4.0 server, I get this output.
Started GET "/" for 127.0.0.1 at 2013-11-06 23:56:36 -0500
PG::ConnectionBad - could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and…

fadelakin
- 3,763
- 4
- 19
- 20
322
votes
8 answers
How to connect to SQL Server database from JavaScript in the browser?
Can anybody give me some sample source code showing how to connect to a SQL Server 2005 database from JavaScript locally? I am learning web programming on my desktop.
Or do I need to use any other scripting language? Suggest some alternatives if you…

Enjoy coding
- 4,268
- 12
- 40
- 50
291
votes
5 answers
How does spring.jpa.hibernate.ddl-auto property exactly work in Spring?
I was working on my Spring boot app project and noticed that, sometimes there is a connection time out error to my Database on another server(SQL Server).
This happens specially when I try to do some script migration with FlyWay but it works after…

METTAIBI
- 3,201
- 5
- 22
- 29
245
votes
31 answers
MSSQL Error 'The underlying provider failed on Open'
I was using an .mdf for connecting to a database and entityClient. Now I want to change the connection string so that there will be no .mdf file.
Is the following connectionString correct?