1

I have an AWS server (MS SQL SERVER EXPRESS 2008 R2 with IIS), with an elastic IP of 54.214.8.111, security groups configured with HTTP, MS SQL and FTP, and I can connect to the remote virtual machine using the rdp file that amazon gives you in the console.

However when I try to connect via visual studio to test if the database is working, it gives me a "Login failed for user 'dbuser' error. I have a user called dbuser on my SQL Server (on the server side of course) with full access permissions etc. I also cannot connect to an ftp on the server, despite all guides and help doc. Something seems to be simply blocking my connection. I have tried the same thing on multiple computers.

Everything seems to be configured correctly except I suspect the server instance.

Can anyone help? PS I'm fairly new to web development, this is my first AWS EC2 server.

1
  • Can you connect to your MS SQL server using the SQL Management Console running on your local machine (not running on your server)? It's possible your SQL server is configured to not permit remote connections (which is often the default). Apr 18, 2013 at 1:40

2 Answers 2

3

Although this post is a year ago, I leave a solution here for future visitors.

  1. Remote connect to the AWS Instance
  2. Run SQL Management Studio, connect to the DB through windows Auth.
  3. Right click to the sever name (the root one) on the left pane, click Properties -> Security
  4. Select "SQL Server and Windows Authentication mode" at the top. Click OK.

Then try. It will work.

Hope this helps.

1

Don't expose your MSSQL port to the internet. By doing so, you're just asking to get hacked.

I ran nmap against your IP and it does appear that your MSSQL port is indeed open:

~ nmap -p 1433 54.214.8.111

Starting Nmap 6.25 ( http://nmap.org ) at 2013-04-16 14:39 CDT
Nmap scan report for ec2-54-214-8-111.us-west-2.compute.amazonaws.com (54.214.8.111)
Host is up (0.085s latency).
PORT     STATE SERVICE
1433/tcp open  ms-sql-s

Nmap done: 1 IP address (1 host up) scanned in 2.00 seconds

So it appears that your issue lies with improper credentials. Verify that your dbuser account has appropriate privileges to connect remotely, and that it's using the correct password.

1
  • I've changed the password and confirmed it 3 times now. Maybe I'm doing something wrong in visual studio? I type in 54.214.8.111 in the server name then the user name and password, then I hit test connection. Says login failed.
    – barnacle.m
    Apr 16, 2013 at 20:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .