I am trying to connect a MySQL server i have made in SQL workbench to ODBC so that i can access the data in excel.
I have checked that my server and instance are running, I have also allowed ODBC through my windows firewall.
I have tried entering 127.0.0.1, localhost and my full computer name as the TCP address however i still get a connection denied message.
However if i test the connection from within workbench it connects fine to the SQL Server.
Ok i found a way to make it work,
Navigate to "users and privileges" within SQL Workbench,
Select your username from the left (not root)
Then were it says "limit to host matching" change the "%" symbol to your local ip 127.0.0.1, Also change the root password.
Then enter these new details in ODBC and it should work.
Related
Our company has a database server on AWS which other the employees can connect to it with MySQL, but when I tried, I got this error message, how can I solve it?
I tried to reconfigure MySQL server but it didn't work. also I double checked username, password, url and port.
To connect to an RDS MySQL instance from MySQL WOrkbench on your dev machine, check a few things.
First, get the full endpoint to the database from AWS Management console.
Ensure the database is publicly accessable.
Also, make sure that you set up your inbound rules correctly.
Once you do these things, you can use MySQL Workbench to connect.
In the hostname field, make sure you put in the hostname you copied from AWS Management console. Do not put in extra information such as:
dbc:mysql://forxxxxxxxxxxxxx.us-west-2.rds.amazonaws.com
make sure it is:
forxxxxxxxxxxxxx.us-west-2.rds.amazonaws.com
THen specify the user name and password and MySQL Workbench will connect:
I want to connect a remote MySql database from MySql workbench but I got an error:
"IO Error: [Errno None] Unable to connect to port 22 on or
xx.xx.xx.xx"
What should I do?
I already add my IP to remote host
when I delete IP that makes the error, then I'm trying to connect, that IP showed up again in my remote host
So how can I connect to my database from MySQLWorkbench?
How to Connect to a Database with MySQL Workbench
One tool you can use to connect to remotely connect to databases on your shared, VPS, or Dedicated hosting account is MySQL Workbench. MySQL Workbench is a free tool you can use to connect to your server databases from your personal computer. MySQL Workbench can be Downloaded for free at the following link:
http://dev.mysql.com/downloads/workbench/
You will want to use the Windows (x86, 32-bit), MSI Installer if you are on Windows. The file we are installing in this tutorial is the mysql-workbench-gpl-5.2.47-win32.msi file.
Once you have downloaded MySQL Workbench, you can install it onto your computer. After you have the program installed, follow the steps below to set up a remote connection.
Add IP to your Remote MySQL
In order for you to be able to connect to your databases remotely you will need to add your local computer IP address to the Remote MySQL in cPanel.
Steps to connect to your database remotely
Open MySQL Workbench.
Click New Connection towards the bottom left of MySQL Workbench.
In the "Set up a New Connection Dialogue" box, Type your Database
connection credentials.
The credentials will be like the following:
Connection Name: You can name this whatever you like.
Connection Method: Standard (TCP/IP).
Hostname: You can use your domain our your cPanel IP address.
Port: 3306
Username: Your cPanel username or the user you created for the
database.
Password: cPanel password or the password for the database user that
was created.
Default Schema: This can be left blank.
Click Test Connection.
Type your password and click the "Save Password in Vault" check box.
Click Ok.
MySQL Workbench should say "Connection parameters are correct". Click Ok.
Click Ok again to accept the connection settings.
Now under the SQL Development section you will see your connection listed in the Open Connection to Start Querying box. Click your newly created account.
Now you will see the databases list in the area on the left.
Description
I've downloaded MySQL installer 5.7.21 for Windows onto my windows 10 machine and setup a server on port 3306 (I see the server status is "Running" within MySQL workbench, and I've also confirmed this by looking in Windows "Services" settings).
I created a database on this server with a dummy table. I have no issue executing sql statements.
Within the Windows firewall I set both "mysql_port_3306" and "Port 3306" as "Allowed App"s.
In MySQL Workbench I connected to the server and issued the (deprecated) command
GRANT ALL ON *.* TO 'username'#'1.2.3.4' IDENTIFIED BY 'password';
with username, 1.2.3.4, and password replaced by my username, the IP address of my laptop (a different cpu than the one I'm setting this server up on), and the password.
On the laptop I created a new connection within MySQL Workbench with the following connection parameters:
Connection Method: Standard (TCP/IP)
Hostname: the full name of the computer hosting the database (which is also the server host name)
Port 3306
Username and Password: the same values set in the SQL statement above
Problem
After doing all this when I test the connection on my laptop the program goes into "Not Responding" status for a short time then becomes usable again without giving results for the connection test. If I try to connect I receive the following error:
Cannot Connect to Database Server
Are there other steps I need to take to connect to the server I've created? Most of the guides I read have to do with installing the workbench, starting the server, or connecting to a server which is already configured to allow remote connections, but I feel I'm missing a step.
Thanks!
I am working on database project, my database is on hostinger. I want to connect mysql workbench to hostinger.
can please someone guide me how to do this.
In cpanel:
Add remote IP Address to Remote MySQL
In Operating System: ODBC and MySQL Workbench
Close MySQL Workbench
Download and Install 32-bit or 64-bit MySQL ODBC connector from MySQL website
Restart PC
Configure ODBC (Windows run Win+R: %windir%\System32\odbcad32.exe )
Add source and choose: MySQL ODBC 5.3 Unicode Driver
Choose Data Source Name
TCP/IP Server: mysql.hostinger.[top-level domain] (e.g. mysql.hostinger.nl or mysql.hostinger.in)
!!! or Public IP address if it's given in cpanel at Remote MySQL on top of the page.
Port: 3306
Fill in: User and Password
Test connection
Start MySQL Workbench
Fill in same data as ODBC connection and test connection.
First SQL command have to be: USE [database name] ;
show tables;
Go to your hpanel
Select your website hosting click Manage
Go to Bottom page Under Database's click Remote MySQL
Check Any Host and Select your Database cick Create
Copy the hostname(which is something like sqlxxx.main-hosting.xx or IP 19x.xxx.xx.xx) located on top of IPv type Field
Goto workbench:
Create New Connection
Connection Method Standard(TCP/IP)
Under Parameters tab Hostname Field Enter Copied Hostname(sqlxxx.main-hosting.xx or IP 19x.xxx.xx.xx)
Port Field Enter:3306
Enter the Username & Password credentials when you created your database in Hostinger
Windows Server 2008
Tableau Desktop 7.0
Local MySQL database using Xampp
When attempting to connect to a localhost MySQL database server using the native MySQL data connection in Tableau Desktop, I'm getting the following error:
"The connection to the data source might have been lost.
Communication with the Tableau Protocol Server process was lost.
Unable to connect to the server "localhost". Check that the server is running and that you have access privileges to the requested database.
Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database."
When using "Other Databases (ODBC)" in Tableau, I am able to connect and return data. However, I would prefer to use the MySQL connection to avoid the limitations of the Other Databases connection.
I created a specific username in phpmyadmin as well as tried using the root username and password and the same error was returned. I created a user DSN in odbcad32.exe and attempted using multiple versions of the MySQL ODBC driver (3.5, 5.2.7, 5.3.4).
Does anyone have any ideas of what might be causing the error? Really appreciate any help.
A bit late in replying but....
MySQL user connections are based on a combination of username,password AND the host you are connecting from.
If you are connecting to MySQL on the same host as Tableau server, then the connecting host could be seen as '127.0.0.1', 'localhost', '::1' or even a hostname if MySQL is configured to resolve those.
The simple way to test would be to set the host field to '%' for the user you are trying to connect as. I would not recommend this for your root user entry or other accounts with significant privileges.