MySQL DB connection issue using the sqlcmd client from the linux box - mysql

When i tried connecting to a MySQL DB server through the sqlcmd client, I am getting the below error:
Sqlcmd: Error: ... : Login timeout expired.
Sqlcmd: Error: ... : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections.
Can someone please help me out on this?
Edit:
To add, the instance name and the Server name are correct. Same goes with the Password and the username

Answer-
I was lucky to get an answer to this question through some different portal.
in this kind of issues we can use the port number next to the server name and that will resolve the issue.

Related

Facing connection issue with mysql while connecting with R-10060

I am trying to connect R to the MySql server and getting the following error:
"Error in .local(drv,....)
Failed to connect to database: Error: Lost connection to MySQL server at 'reading authorization packet' , system error :10060"
Please note that I am facing this issue on the localhost.
Check to be sure you can connect using a basic MySQL client from the machine you are running your R code on first. That will help you eliminate firewall, hostname, username, password, etc issues. (Seems likely that is what your problem really is: https://forums.mysql.com/read.php?34,49742,239961).

SQL Server Mgmt Studio 2014 ; Error 40

I just installed MS SQL SERVER MANAGEMENT STUDIO 2014 , but when I open it I have to add a server name to connect it but it is showing me following error when I enter server name.
TITLE: Connect to 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 correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2) The system cannot find the file specified
I don't know what to do now, help me out please.
Thanks
Error
Here's mine, if it helps. See if you should have more to it, like SQLEXPRESSPC in my case.
You need to provide an instance name.
Instance Name has been provided during the installation process of SQL Server.
Inside the Server name combobox, you should type something like : .\SQLEXPRESS or .\MSSQLEXPRESS depending on your version of SQLServer.
The .\ refer to your local machine.

SQL Server: getting error 26 after clicking on connect button

I have prepared a program with Visual Studio 2010 and I'm working with SQL Server 2008. Before 2 weeks ago, this connection was working properly. Now, I'm trying to use it again. When I'm clicking on the Connect button, it waits, and then gives this error:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
is not accessible. Verify that the instance name is correct and that
SQL Server name is configured to allow remote connections. (provider:
SQL Network Interfaces, error: 26 - Error Locating Server/Instance
Specified.)
I googled this issue, but nothing helps.
I will be grateful to help me with this issue.
Do ensure that service is running. You can check this by writing this query on the query analyser as:-
IF EXISTS (SELECT 1 FROM sysprocesses WHERE LEFT(program_name, 8) = 'SQLAgent')
PRINT 'Running!'
ELSE
PRINT 'Not running';
From here:-
Make sure your server name is correct, e.g., no typo on the name.
Make sure your instance name is correct and there is actually such an instance on your target machine. [Update: Some application
converts \ to . If you are not sure about your application, please
try both Server\Instance and Server\Instance in your connection
string]
Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
Make sure SQL Browser service is running on the server. If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.
Open command prompt and execute this code:
For default instance : NET START MSSQLSERVER
For named instance : NET START MSSQL$

Unable to use sql server user name and password

my user name is Work/Sainath and password is empty and i use windows authentication to login. My server name is '.' and when i enter this as connection string in visual studio web form i get an error for the / behind sainath ![enter image description here][1]
please help as i'm not able to connect and tired of this.I tried changing in security but not not highlighted and not able to change the fields
error that i get for connection string(SqlConnection con = new SqlConnection("Server=.,User id=Sainath,Password=,Database=Work");)
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 correct and that
SQL Server is configured to allow remote connections. (provider: SQL
Network Interfaces, error: 25 - Connection string is not valid)

Exception EZSQLExeption in module VDB1.exe at 002A7A5C. SQL Error: Host'Gareth-PC' is not allowed to connect to this MySQL server

I am using Delphi xe2 and I would like to know qhat this error is and by what means I need to get around this, I am attempting to connect my database application to a wamp server through a LAN connection and I seem to have the Hostname username password and port correct but when I attempt to log into the MySQL database I get this error:
(Exception EZSQLExeption in module VDB1.exe at 002A7A5C. SQL Error:
Host'My-PC' is not allowed to connect to this MySQL server)
Could you please give me a way to get around this? Thanks.
The error message states:
Host 'My-PC' is not allowed to connect to this MySQL server
And this would indicate that the SQL server is blocking your client based on its host name, 'My-PC'. So, you need to configure your MySQL server to allow connections from that host.