简体   繁体   中英

Connecting to a remote MySQl server on cygwin

I try connecting to a remote mysql server on ip 10.198.161.41

When I give

mysql -u user -p -h 10.198.161.41

OUTPUT:

Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on '10.198.161.41' (111)

The mysqld on 10.198.161.41 runs on port 4308 .

Should it be mentioned in the command?

There is also no my.cnf file in cygwin .

What could I try?

(Info:The 10.198.161.41 is a windows machine and has mysqld running on it)

If you use mysql any different port than 3306 which is mysql default port then you must mention it to connect as per below-

mysql -u user -p -h 10.198.161.41 -P 4308

Here small p denotes to password and caps P to port.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM