0

A MySQL Server is newly installed on linux computer LPNBUNTU.

On local linux I can get a DB-connection and I was finally able to set a root password.

When connected I get

MYSQL>status
root@localhost

I rather think MySQL should be aware on that computer it is installed. Thus I guess the user should be root@LPNBUNTU. Just an idea.

I open the port 3306 on linux sudo ufw allow 3306

My problem is, I can't connect from my Window-10 computer via mysqlsh. I think should doing this like

mySQL\SQL>
 \connect --mysql root@lpnbuntu:3306
Creating a Classic session to 'root@lpnbuntu:3306'
Please provide the password for 'root@lpnbuntu:3306': *********
after some timeout I get 
MySQL Error 2003 (HY000): Can't connect to MySQL server on 'lpnbuntu' (10061)

I guess the MYSQLServer should be made aware, that it on computer lpnbuntu, and should react to all connection request addresses from any computer on port lpnbuntu:3306.

How can I make this happen?

1

1 Answer 1

0

I believe this can be resolved by setting the "bind-address " to 0.0.0.0 or the specific IP address of your win-10 computer.

this is done by accessing the MySQL config file and physically typing in the desired ip.

the file path is usually:

/etc/mysql/my.cnf

0.0.0.0 will allow access from all networks.

2
  • I did this: added /etc/mysql/my.cnf a line with --bind-address=0.0.0.0. This does not help. Still no connection possible. Same error message as above. Additional question: is a MYSQL database after installation generally not responsive to connection request on TCP/IP sockets?
    – olippuner
    Dec 7, 2020 at 8:39
  • When I ping linux host from window I get an ipv6 response. Is suggested bind-address only good for ipv4?
    – olippuner
    Dec 7, 2020 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.