Unable to connect to SQL Server using ipaddress or localhost and portno 1433 - sql-server-2019

I have installed Microsoft SQL Server 2019, I am able to connect using hostname and Windows authentication from SSMS, but when it try to connect to it using localhost or the IP address and port 1433 from SSMS or DBeaver, it doesn't connect.
I have verified the service status, port no, server logs, all looks good but still unable to connect. Can somebody please help?

The issue is resolved after enabling server authentication.steps :-
1. In SSMS right click on conection
2. Go to properties-> security
3. Change authentication mode to windows and SQL server from windows authentication.
After making this change , I am able to connect to the sever using ipaddress.

Related

Unable to connect Tableau Desktop to remote Mongo Server

I am trying to connect a Tableau desktop to a remote MongoDB server using ODBC connector. I have followed the steps mentioned in this page https://docs.mongodb.com/bi-connector/current/connect/tableau-auth/#std-label-connect-tableau-auth
But I am getting the below error
[MySQL][ODBC 1.4(w) Driver]Can't connect to MySQL server on '13.38.33.197' (64)
Generic ODBC requires additional configuration. The driver and DSN (data source name) must be installed and configured to match the connection.
Unable to connect using the DSN named "test new". Check that the DSN exists and is a valid connection.
Please help me in resolving the issue.
This error occurs when a running mongosqld instance cannot be found. Here are the steps to follow for a successful connection to mongoDB from Tableau desktop.
Install mongoDB connector for BI on your machine.
In command prompt, navigate to mongosqld file location.
Use the below command to provide host and connection details
mongosqld --mongo-uri --auth --mongo-username --mongo-password --mongo-authenticationSource
The above command will create a live connection on localhost.
Create a system DSN with host/server IP as localhost or 127.0.0.1 and the same DB credentials.
On Tableau Desktop, select connect via Other Databases (ODBC).
Select the system DSN created and click on connect.

pgAdmin 4. Unable to connect to server

I had a postgreSQL server/database working in a local area network in Windows. To have access to it through Ethernet I changed the IP in the router settings. Everything was fine. But when I came today to the office, I could not have connected to the server. Moreover, I cannot even create a localhost server on that PC. The error is "Unable to connect to server:" and nothing else. When I turn off the postgres in services it specifies the error with TCP/IP, port, etc. But not when the service is on. When connecting to the server, the pgAdmin asks for the postgres password. Endlessly, thou the password is printed correctly and the METHOD is set to trust. The reinstallation did not help.
What does this error mean? And what is the cure?

How to set up localhost server and database for PostgreSQL?

I am new to PostgreSQL, and I want to use it on my personal laptop for personal projects. I use SQL Server and SQL Server Management Studio at work, coding-wise I'm ok but I need some help with setting up the localhost on my laptop.
So I downloaded PostgreSQL and installed it along with pgAdmin that came with the package.
During installation, it asked me to create a PostgreSQL superuser password, which I did.
Then I tried creating a new server using pgAdmin as follows:
General Tab:
Name: localhost
Server Group: Servers
Connect Now?: check
Connection Tab:
Host name/address: localhost Port: 5432
Maintenance database: postgres
Username: postgres
Password: [blank]
But when I click save I'm getting an error message:
Unable to connect to server: could not connect to server: Connection
refused (0x0000274D/10061) Is the server running on host
"localhost"(::1) and accepting TCP/IP connections on port 5432? could
not connect to server: Connection refused (0x0000274D/10061) Is the
server running on host "localhost"(127.0.0.1) and accepting TCP/IP
connections on port 5432?
Also tried replacing the password field with the Superuser password, getting the same error message.
Would greatly appreciate it if anyone offers any insights into this problem, I might just be a noob when it comes to server setups...
Thanks,
Mike
Update:
I believe there's a service I need to start as suggested by #Scott Moniz. I went into services.msc, tried to start the service postgresql-x64-10 - PostgreSQL Servier 10, and I got this error message:
"The postgresql-x64-10 - PostgreSQL Server 10 service on Local
Computer started and then stopped. Some services stop automatically if
they are not in use by other services or programs".
I then tried editing the property of the service, by changing the Log on as option to Local System Account and tried starting the service again, still got the same error message.
I'm using Windows 10 Home edition, it this helps to resolve the issues in anyway
Thanks,
Mike
Are you sure the database service is running and listening?
CLick Start>Run> type services.msc
Look for a postgresql service - if it does not say started right click it and click Start.
Alternatively you can restart your computer and the service should start if it is set to 'Automatic'

PGAdmin III cannot connect AWS RDS

I am trying to connect AWS RDS PostgreSql from PgAdmin 3. I followed the below link
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html
In Security Group, I also added PostgreSQL and All traffic as below
The "publicly accessible" flag was enabled (updated after Mark B's comment)
I got the error from PGAdmin3
Very appreciate for any suggestion
******UPDATE*******
I can connect pgAdminIII to AWS RDS successfully using home wifi, but cannot connect using office wifi.
My concern is:
Was the port 5432 blocked by office wifi?
How can I configure/update the port without impacting to current API?
Note: My current API is working well (CRUD)
Can you can test your connection to a DB instance using common Linux or Windows tools first?
From a Linux or Unix terminal, you can test the connection by typing the following (replace with the endpoint and with the port of your DB instance):
$nc -zv DB-instance-endpoint port
For example, the following shows a sample command and the return value:
$nc -zv postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com 8299
Connection to postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com
8299 port [tcp/vvr-data] succeeded!
Windows users can use Telnet to test the connection to a DB instance. Note that Telnet actions are not supported other than for testing the connection. If a connection is successful, the action returns no message. If a connection is not successful, you receive an error message such as the following:
C:>telnet sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com
8299
Connecting To sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com...Could not
open connection to the host, on port 819: Connect failed
If Telnet actions return success, then you are good to go.
If you are trying to access it from a network which is not listed for that port. you need to add inbound rules for those network IPs from AMAZON RDS system
You will also need to set Public accessibility true under Connect & security tab in RDS console.
Read this post.In your security group go to unbound rules and add my ip.
and make sure your database is public.
https://serverfault.com/questions/656079/unable-to-connect-to-public-postgresql-rds-instance

Can't connect to Google Cloud SQL

I opened a trial account on Google Cloud and I'm having difficulties connection to Cloud SQL.
I made the basic setup, authorizing my IP/32 && adding a new User (appUser).
But I can't open a remote connection to the instance.
mysql -v --host=<ip> --user=appUser --password
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '<ip>' (60)
I'm at work and obviously behind a ton of firewalls and whatnot. Could this be the cause of my problems ?
There is a good change that it is a firewall problem. Error 2003 (from MySQL client manual) means that it can't connect to the server.
Can you try to connect through a computer outside the firewall?