mysql connection failed 10061

HalCHub
HalCHub used Ask the Experts™
on
I am running an Ubuntu server on Hyperv.
on my Ubuntu server I have my sql which I am able to connect to via mysqlworkbench

When I try to connect from the host machine using mysqlworkbench i am getting and error:

Failed to connect to mysql at 192.168.254.123 (which is my ubuntu server) with user root.
Can't connect to MySql on 192.168.254.123 (10061).

How do I resolve
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
That  Generic error  means the newwork connection has been refused

SQlWorkbench will only listen for local host connections  

you will have to modify your  .CNF file and comment out

bind-address 127.0.0.1

and then restart your SQL service
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
SQlWorkbench will only listen for local host connections
Sorry but that's not true.  MySQL Workbench will connect to remote database servers if you have the privileges to do.  I have MySQL Workbench on this machine but my MySQL databases on not on this machine but on others including databases that are on the internet.  It works fine.
@Dave My apologies.  I stand Corrected  I thought that was the default setting to only listen for LocalHost :(
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
That's ok, I learn new things here all the time.

Author

Commented:
so what does that mean ?
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
Can you ping 192.168.254.123 from your host machine to make sure you can connect to it?  Here is the general info on your error:  http://dev.mysql.com/doc/refman/5.7/en/can-not-connect-to-server.html
Distinguished Expert 2017
Commented:
the default root user account in mysql can only be accessed/used from localhost, you need to add another account root@% OR root@remotehost to be able to use it from the remotehost or from any host.

My suggestion is to create a new account and grant the rights it needs, or associate it with a specific database
authentication when the account has all rights is username/password when account lacks mysql security rights, authentication is username/password/database.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial