Connect to Azure MySQL Database using MySQL Workbench - mysql

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.

Related

Visual Studio Code mssql extention: SQL Server (mssql) - Unable to connect to server

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>'

Can't connect to MySQL server on 'xxxx.mysql.database.azure.com' (10061): Authentication failed

I have installed trial version of dbForge Fusion for MySql for my visual studio 2017 enterprise edition. Also I have created mySql server on azure portal. So I am using mysql server from microsoft as PaaS. On azure portal I have disabled the SSL requirement for connection to this database server. Now I am trying to connect to this mySql server from Visual Studio using Fusion => New Connection window.
I mentioned few details that I filled for connecting to mysql database as below -
Data source - auto selected as "MySql"
Connection - General tab I filled mysql server domain as -
Host - xxxx.mysql.database.azure.com
Port - 3306
User - usename#xxxx
Password - xxxxxxxxxxxxxxx
Connection - Advanced tab - auto selected values as it is.
Connection - Security - no selection
Connection - HTTP - no selection
Connection - Embedded - no selection
I have attached the screenshot of above details.
When I click on Test Connection button, I am getting error as -
Can't connect to MySQL server on 'xxxx.mysql.database.azure.com' (10061): Authentication failed.
Please find the screenshot for the error.
I am able to connect this mySql server using same credentials using mySql workbench tool.
Can you please tell me what I am missing here?

Cant connect to Azure MySQL through MySQL workbench

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.

Setup a linked server connection from Microsoft SQL Server Management Studio to a MySQL Amazon Web Services MySQL RDS?

I want to add a MySQL instances that is running as a RDS service through Amazon Web Services as a Linked Server in Microsoft SQL Server Management Studio.
Does anyone know of any information on how I can set this up?
What I want to be able to do is query data from my MySQL server from the local Micorsoft SQL server and then combine the data into other queries.
SELECT *
FROM OPENQUERY(MySQL_Link, 'SELECT *
FROM users
WHERE name = 'test')
Do you already have the ODBC connection set up to connect to the instance?
Unable to connect to remote mysql server using unixodbc, libmyodbc
I would think that once you have that working, you would be able to use the same process for creating a linked server to MySQL
I hope this is helpful.

Connect to MySQL database on vb.net using dial-up connection

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!