I have installed mysql server and workbench on a machine that is running on Ubuntu Linux platform.I also have installed mysql server and workbench on my machine that is running with Windows 7 OS.Both the machine are connected to network.I want connect to the mysql server from my machine.i tried changing the bind address of mysql server according to the machine's ip, and gave that ip as host name while connecting through mysql workbench from my machine.But i am not able to connect successfully.Please Help
Well, IMHO, the only problems that could be are ither:
Username does not have enough priveleges
Server does not accept connections
Firewall Blocking port
You should investigate each of these cases
Related
When attempting to connect to remote MySQL server from my Windows machine using MySQL workbench - I get an error about connecting to localhost (unsure where the software is picking up localhost). However when I attempt to connect through an SSH tunnel it connects just fine (I cannot use this for the software I am creating though)
when I run netstat on the server:
netstat command
...(more entries)
the bind address has been altered in mariadb and mysql configs. if there are any more configs people would like to see to help with solution please let me know. I have also set up the user in mysql to allow remote privileges:
mysql users
I am pretty confused.
I have several vms instances running in my vm player. Several of them are cent-OS acting as HTTP servers. The HTTP server is/are accessible over network. The HTTP server is on nginx.
Then I have a vm running on cent-OS having MySQL installed. And another vm instance running MS Server 2019 having MySQL Installed. Am using MySQL 8.0.18 on both these machines.
All these machines are on same sub-net and gateway. for example the IP of one of my vm having HTTP server is 192.168.0.133. And the machines with cent-OS having MySQL Server installed is having IP 192.168.0.140 and machine with MS Server 2019 having MySQL server is having IP 192.168.0.141.
Now the issue is am unable to access any of these MySQL servers from the network(LAN) or in other words am unable to access the MySQL server running on either .140 or .141 from the machine .133 meanwhile am able to access the HTTP server across the network.
But if I running MySQL server on the same machine having HTTP server. There occurs no problem whether I use 127.0.0.1 or localhost in my db host configuration
My application is based on a PHP framework known as laravel.
I have disabled firewall from both the above machines. The port 3306 is open on both machines. Am able to ping all machines with each other.
I had tried things like:
skip-networking(commenting out this one or just deleting),
bind-address(IP of the machine running MYSQL server),
grant privileges on an ip or from any IP to users/user,
flush privileges
Even modified iptables.
Am entering db host as the IP of the machine where MySQL is running.
The error am getting is SQLSTATE[HY000] [2002] Connection refused
You've nearly done it all right. Setting bind-address to the server's IP however means that you must connect via SSH.
Change the IP to 0.0.0.0 and restart MySQL, and hopefully that should be you all set.
I tried everything which I found on google but couldn't connect linux mysql server from other server, Server where Mysql is located is Linux OS and from where I want to connect that is ubuntu, What can I do?
I already grant all privileges to user, bind-ip-address, and comment localhost etc. Is there any sqlserver's internal configurations?
Did you check ssh connectivity between two servers? if it doesn't works configure sshd properly and if ssh connectivity works fine then,The Target server's internal firewall might be blocking remote mysql connections.
After a long R&D, when nothing help me, I think about port number, and that was silly mistake, actually I check available port on AWS for that instance from I want to connect and found I forgot to open 3306 (default MySQL port). I just add this and everything became perfect.
I'm trying to setup a new connection in MySQL Workbench to MySQL server on my other network computer named say: SERVER
Hostname: SERVER
Port:3306
Username and password I leave blank.
I'm getting "unknown server host"
SERVER has dynamic IP.
How do I provide the correct Hostname?
I don't think that you can connect to a computer of your network with its name only in MySQL Workbench.
So, if you can't allocate a fixed IP with DHCP to your computer running MySQL maybe you could use port forwarding in your router config (localhost:port -> computer2_ip:mysql_port) so you will be able to connect to localhost:port in MySQL Workbench. You could also create a tunnel between the two computer but I think this is rather a question for ServerFault.
I'm having a weird problem where I can connect to a certain database server from my local machine (and my friend can also connect to the database server from his local machine) but we can't connect to the database server from his AWS server.
What I get on the AWS server is:
"Can't connect to MySQL server on '<IP address>' ".
It's not as if the database server is only allowing connections from certain IP addresses; it didn't know about my IP address before I tried to connect.
Any idea what could be different about my AWS machine that could be making the connection not work?
Is the MySQL server inside the same network as the local machines? If so, it might explain why local machines can connect but the remote AWS can not.
By default, MySQL disables all remote connections. You can check if the remote connections are enabled. It could also be an issue with port block. MySQL uses port 3306 by default. Either MySQL or the AWS might not be configured to send data through the firewall on port 3306.
Here is a decent article explaining how to open these things up.
http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html