I would be grateful if someone could provide some help on how to connect to a local MySQL server (computer) from my laptop which is on the same local network.
I downloaded/installed MySQL on Windows (Installer & Tools) on the laptop and computer and I think they're both up and running.
When I try to 'create a connection' on my laptop within MySQL Workbench, I just can't seem to connect and I've tried various usernames and passwords. Do I need to configure the settings on the desktop server?
Thanks in advance
The key word is "think". You need to know that the server is up.
Open a command shell and type "netstat -a". You'll see every listener on every port.
If you see that something's LISTENING on port 3306, then it's most likely MySQL.
If port 3306 doesn't appear, you have your answer.
You need to know that the listener is running on the database machine you'd like to connect to.
Once you ascertain that the listener is up and running, you need to know that your client has been GRANTed permission to connect via username and password. Only the DA for the database can set that up and let you know.
Related
My main problem right now is that I can't connect to the remote mysql server while developing on my machine. I'm trying to update a website that was previously developed by someone I do not know. I've been editing the site on my local machine but I need to access data from the mysql database that it has been using. I have the username and password that the site uses to connect to the mysql server. I can connect to it through phpmyadmin but I would like to work locally without publishing my edits to the server.
I found this here in SO and I tried running the scripts in phpmyadmin using my pc's IPaddress but I keep getting
Access denied for user 'username'#'localhost' (using password: YES)
even though I'm 100% sure I'm using the password that I used to login to phpmyadmin. I tried creating a new user but the login I'm using doesn't seem to have a Create User privilege either.
I understand that the previous developer might have a different "admin" account that has all the privileges but I have no way of knowing either.
I am a C# developer but I'm really new to MySql. Any help is greatly appreciated.
This may be a firewall issue. phpmyadmin listens on port 80 by default, but mySQL listens on port 3306. Please check the firewalls on your local PC (to make sure you can get out on 3306) and the server (to make sure you can get in on 3306).
We're in the process of setting up Tableau connectivity to our company's sales database and so far, the people that have been attempting to connect (they're from some other company) keep getting denied. The errors they're getting are as follows.
Unable to connect to the ODBC Data Source. Check that the necessary drivers are installed and that the connection properties are valid.
Can't connect to MySQL server on '[IP address] (61).'
Unable to connect to the server '[IP address].' Check that the server is running and that you have access privileges to the requested database.
Today we opened ports 3306 and 20560. We were hoping we could set up some kind of port forwarding thing so that they connect to 20560. I'm not sure what we need to do to set that up, however. I was also told that SSH tunneling is an option, but connecting with PuTTY doesn't yield any results.
I'm at a complete loss as to what I need to do to allow them to connect. I'm also not sure that opening port 3306 is safe and I'd like to know if I should have it closed. I randomly picked port 20560 because it's not being used for anything. We don't want just anyone to connect, but I've been told that the IP address connecting to our database may not be static.
I used a quick start guide to create a mysql database on EC2 that I can access and query using RStudio. However, I'd like to use Tableau Desktop to visualize the data as well. Tableau can connect to MySQL, but Im not sure how to make it work with EC2. I think I need to use port forwarding. I've Googled extensively and found a few examples but I'm completely new to this and don't know where to begin.
I'm using Terminal on Mac OSX. I'm able to login to SSH and to MySQL once in SSH.
Tableau needs a server, port, user, pass, and initial SQL statement. I'm assuming the initial SQL statement is just "use MyDatabase;"
I remember running into this issue awhile ago and found the solution again. I think the main thing to remember is that you have to use the localhost as the address in Tableau after you ssh into EC2 instead of the address of the actual EC2. You also have to setup your ssh to forward the port as you mentioned. Here is how you do that with PuTTY.
In the first screenshot you will see I added 127.0.0.1:3306 as the destination. This is the address of MySQL as setup on your server. I included 9990 as the source port. This is the port that PuTTY will be monitoring for any given calls. Once you have these defined click add and then save your session and connect with your server credentials through PuTTY. Go to Tableau.
In the second screenshot you will see that I used 127.0.0.1 for the server and 9990 for the port that I defined in PuTTY. You then add the credentials in Tableau that correspond to your MySQL user that is setup on EC2.
Well, first off, I am no programmer. I am a medstudent with decent computer knowledge, and that has done this at least one time before in his home network.
Now, i am doing some research at the hospital, and for my database i want to use mysql, running a server on a local network computer and being able to connect to it from laptops over wi-fi to work on the database.
So i download mysql installe, run it, and i connect via localhost perfectly well with the root acc or the set up accounts i will use. I do bind-address to change its ip to the computers IP on the network, and i can connect again with root and with my accounts perfectly well on the machine the same server is on, using xx.xx.xx.xx + port to connect, with root and all other users.
however, using workbench on a laptop connected to the local network, I cannot connect with any user, it always gives error 10060.
--Firewall is off
--All AV software is off
--accounts are set up correctly to allow connection from any host
--client PC can ping server PC
--Netstat -anob shows mysqld.exe listening on the port i need it to be listening
The network here does block connections, but the port im using is open due to the fact it is used for another server type application that as very little to no traffic, so i just grabbed the opened ports for that application as they showed up in netstat and configured te server to use one of those ports.
How can i make sure the server PC is open at those ports?
THe client im trying to connect with is either the mysql workbench or heidisql.
Neither can connect, however i have succesfully used heidi before to connect to a database I have in DB4free.net. I cannot use that at the hospital, because the network shuts off the default port for mysql which is what db4free.net uses.
Any ideas why i cant connect to that PC?
mySQL often does not come configured for remote connections by default. The port may be open, but if mySQL isn't listening or is set to reject all remote connections, you won't be able to connect.
Check the documentation for your version of mySQL to find out how to modify your mySQL server's configuration to allow remote connections.
When I first set up MySQL Server in Netbeans everything worked well. Now one day I think I accidentally clicked something or my computer lost battery life when I was connected to MySQL Server, and after these event(s) I have not been able to connect to MySQL Server. I do not know for sure if either of the above events would have any effect on connecting to a MySQL Server database.
Anyway since these events I have found that I cannot "start" or "connect" to a MySQL Server databse. I am doing this all through Netbeans IDE.
Here is a picture of how I try to connect to my databaseL:
This is what the error message says after I click connect:
Unable to connect. Cannot establish a connection to jdbc:mysql://localhost:3306/twitterdata using com.mysql.jdbc.Driver(Unknown database 'twitterdata'). The name of the database I am trying to connect to is twitterdata
How can I get reconnected to the MySQL Server database "twitterdata"?
I am not familiar with MySQL, databases, servers and I have no idea how to get reconnected. If there is any other helpful information that I should provide let me know.
What MySQL tools can I run to find my problem?
Why would the error message tell me that the database is unknown?
If I got to C:\ProgramData\MySQL\MySQL Server 5.5\data. There is a folder named twitterdata.
Here are the contents of that directory:
Please let me know if you need more information or if you have other suggestions that would help!
Thanks for all the help!
If you are using windows system and facing the error 'unable to connect localhost 3306' at the connection time. First you have to need start MySQL services in 2 steps:
Press "Windows key + R" write "services.msc"
And run as admin start MySQL service.
There can be three issues:
1) Either your server isn't even running. Open your command prompt and enter mysql
2)Let's say it is , can you check if it's connecting on the correct port.
Like in the url, you are using 3306,
Try following this post:
How do I find out my MySQL URL, host, port and username?
3) Can you check what if there are any credentials to the database you are connecting?
https://netbeans.org/kb/docs/ide/install-and-configure-mysql-server.html