I have set up an Azure SQL server and database. In the dashboard, I am selecting the SQL Database to copy the server name (xxxxxx.database.windows.net).
I am creating a new connection in MySQL workbench and putting this servername as host.
The port I am putting is 1433.
After entering username and password, I am testing the connection. I am getting the following error, as the connection is not getting established between my database/server on Azure and workbench. The error is:
Lost connection to MySQL server at 'reading initial communication packet', system error:104
Any suggestions on making me understand why is it happening and how can the connection be made will be highly appreciated.
Your post is confusing, are you using Azure SQL Database or Azure Database for MySQL? The name format "xxxxxx.database.windows.net" is for Azure SQL Database, which you should not use MySQL workbench to connect. I'd suggest you switch to SSMS and try again.
Related
I'm trying for the first time to get my project to run in Visual Studio Code. This includes a MySQL database. So I've installed the SQL Server (mssql) extension version 1.7.1. I follow the instructions here: https://learn.microsoft.com/en-us/sql/visual-studio-code/sql-server-develop-use-vscode?view=sql-server-ver15
I get to the section "Connect to SQL Server" and enter:
servername: localhost
db name: c3
Authentication type: Integrated
At the end of the section it should connect with the server but instead I get two errors:
mssql: Error "Unable to connect using the connection information
provided. Retry profile creation?"
mssql: Error 2: 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)
Does anyone see what is going wrong here?
I've re-installed the extension but with the same result.
A MySQL db and Microsoft SQL Server db are two different things.
It seems that there's no SQL Server installed? You might install the free SQL Server Express Version, create the database in there and then connect from Visual Studio Code.
You have to install the database server yourself as VS Code is just a client. You might also use somekind of hosted offers (many webhosters offer a mysql server with self service installation, or use a cloud based database server). Yout can also use a local database (e.g. SqlLite) which is file based and doesn't need a special installation.
You should do the following
install SQL server in your machine and create Database here
Create a login and a database user here
If you are Using VS code install SQL Server (mssql) open new
connection, follow the prompts to specify the properties for the new
connection profile
If you want to login to your server to make sure of your data
sqlcmd -S localhost -U SA -P '<YourPassword>'
Hi I am trying to connect to my MySQL DB which is hosted by strato. On their site I can create a DB and I did. I am able to connect via PuTTy like shown in this link. And I found the port, hostname etc as you can see but now I am trying to connect to the database via NaviCat but I keep getting the following error: 2013 lost connection to mysql server at 'reading initial communication packet' system error 0.
I configured NaviCat like this (as password I filled in the masterpassword strato provided me)
and this (as password I filled in the masterpassword strato provided me)
Screenshot of the error I am getting:
There is also a page on my hosters site with an tutorial on how to connect to their DB using PuTTy: link to page
Maybe you're wondering why I don't contect the host, it takes ages for them to reply...
What am I doing wrong why cant I connect how can I fix it?
If anyone can help me i would rlly appreciate it!
The manual says the hostname for a database connection should be
rdbms.strato.de
Or has this never been possible? I quote Can not connect to mysql database [strato]:
Connection posibilities(access) depends on your hosting package. But,
actually, remote connections to strato mySQL is not allowed(security
reasons). I have the same trouble with PowerWeb Basic.
The access is probably meant for applications you host with them, not running elsewhere (eg. at home).
If you want to work locally, perhaps they allow you to take a dump of your database that you can install locally? Do they have PHPMyAdmin?
I have a Web App running on Azure. I can connect to the DB with Visual Studio and sending/retrieving data on my app works fine.
However, I can not connect to the MySQL db using MySQL Workbench.
The error that I have is
Lost connection to MySQL server at 'reading initial communication packet', system error: 54
I have whitelisted my IP on the azure portal and opened the port 1433 on my computer. I don't understand why can't I connect using MySQL Workbench while having no problem with Visual Studio.
EDIT:
Here is how i have setup MySQL Workbench:
And Here is my Azure portal:
I'm using port 1433 because that is the port given on the Azure Portal, but also in this tutorial: Connect to Azure DB using MySQL Workbench
Ok - now that you included screenshots: You're trying to use MySQL Workbench to connect to a SQL Database (which is SQL Server as a service, not MySQL).
Edit: 8/15/2017
Azure now offers Azure Database for MySQL which is currently in public preview.
In your specific case, you created a SQL Database, which cannot be manipulated with MySQL Workbench.
I am trying to connect mysql database in phpmyadmin to the access file. I am using mysqlconnector ODBC for that. Tutorial I am following is this
The problem is that when I give the credentials to connect to database, it gives me error as shown in this snapshot
I have tried hard to search on internet but failed. What mistake I am doing. I am putting the ftp information of the server there. Is there any database credentials i need to put?
You can't use the FTP credentials to connect the MySQL database. You have to use the database credentials. Make sure you have done followings before connecting.
Make sure MySQL server is up and running on the HOST IP and PORT.
Your MySQL server can accept connections from your IP or use % for
all IPS
Make sure you have a valid USER account
EDIT
Or tell us where(local server, internet, IP) the MySQL database is installed. The port number the server is listening on. How you access MySQL server normally.
I want to connect to a MySQL database but the only connection available is a telephone line, a dial-up connection. I'm using vb.net 2005 Express for my project. All local connections are working the only problem is how can i get the server to connect, like IP to connect to establish a connection.
Thanks!