Connect to the Mysql server remotely.
1. Command Line: C:/> mysql-h 192.168.0.53-P 3306-u vicky-padmin
The local computer is Windows 7, and the remote computer room is Linux.
192.168.0.53 is the IP address of my remote linux system. After the connection is successful, "mysql>" appears"
Solutions to problems:
1.Can't connect to MYSQL server on '192. 168.0.53 ';
Possible causes:
1. the MYSQL service is not started.
Open the mysql service on the remote computer.
Port 2.3306 only takes effect locally and does not support remote access. You can check the status of port 3306.
Netstat-anp | grep 3306. It can be seen that port 3306 is only open to the local device.
Under normal circumstances, mysql only listens to port 3306 on the IP address 127.0.0.1, and denies access from other IP addresses (you can view it through netstat. (To cancel the local listening, modify the my. cnf file :):
Sudo vi/etc/mysql/my. cnf
Bind-address = 127.0.0.1 // locate this content and comment
2.Acess denied for user 'root' @ '192. 168.0.70 '(using password: Yes ).
Possible cause: the root account has insufficient permissions. It may only be used locally and cannot be remotely logged on.
Check the account and account scope in the database. The root account can only take effect locally.
We can create an account that can remotely log on to Mysql from other IP addresses. Here, I simply set up an account that can connect to the mysql server from any host.
Grant all privileges on *. * TO 'vicky' @ '%' identified by 'admin' WITH GRANT OPTION