MySQL accessible from my machine but not from another machine on the same LAN - mysql

I have MySQL running on an Apple OS X 10.14 machine. I use MailSteward Pro to access it, and it works fine locally from that machine. From another machine on the same LAN, which can ping the SQL server machine just fine, I get this error:
Failed to connect to server: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I am not specifying a different .sock file on the connection on the MySQL server machine. What am I doing wrong - how to debug this?

Related

Cannot connect to a MySQL server in a suse machine from a Windows using MySQL Workbench

Hello I have a MySQL server running in a suse machine, I can connect from the localhost using workbench but I can't from a remote windows machine.
I have set bind address to 0.0.0.0 on the my.cnf file on the server and I have assured that port is open.
In fact I do a telnet to the port from the windows machine and it connects.
When I try to connect from workbench on the remote machine the following error appears:
Lost connection to MySQL server at 'waiting for initial communication packet' error 10060
I have found a other post which explain how to address that but I guess that only works if the server is running on a Windows machine:
Lost connection to MySQL server at 'waiting for initial communication packet'
How could I replicate that in a linux machine? Thanks
PS: I am connecting through TCP.
I don't know what to try.

Cannot connect to local SQL server through socket, using PopSQL in MacOS

I am new to SQL.
I can log into the terminal and create databases.
When I opened PopSQL and tried to connect to localhost, an error message appeared:
Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
I have tried many solutions on Internet but they did not work.

Unable to connect to MySQL installed on another virtual machine or over network

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.

Having issue accessing mysql server from other machine

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

phpmyadmin and mysql socket error

once i try to connect to mysql on phpmyadmin in ubuntu i got this error
2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
but with mysql query browser i connect with out any error and it works
why phpmyadmin does not connect?
The command line client uses a unix domain socket while PHPmsyqladmin uses a network socket. You'll need to enable the network socket in the mysql config, most likely.
EDIT:
You can read about some of the troubleshooting (and windows) side of this: http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html
And here is how to set up mysql to use a network config:
http://www.howtogeek.com/howto/mysql/switch-mysql-to-listen-on-tcp/