3 people read
This error occurs if you want to connect to your MySQL:
ERROR 1130:host ' 192.168.16.145 ' isn't allowed to connect to this MySQL server
Change the table method.
It may be that your account is not allowed to log on remotely, only on localhost. This time, as long as the computer on the localhost, log in to MySQL, change the "MySQL" Database in the "User" table "host", from "localhost" to "%"
Mysql-u root-pvmwaremysql>use mysql;mysql>update User Set host = '% ' where user = ' root '; Mysql>select host, use R from user;
2. Authorization law.
(1) Example: you want to myuser use MyPassword from any host to connect to the MySQL server
GRANT all privileges on * * to ' myuser ' @ ' percent ' identified by ' MyPassword ' with GRANT OPTION;
(2) If you want to allow the user to connect to the MySQL server myuser from the IP 192.168.16.145 host and use MyPassword as the password
GRANT all privileges on * * to ' root ' @ ' 192.168.16.145 ' identified by ' MyPassword ' with GRANT OPTION;
(3) The last sentence must be added!!!
Mysql>flush privileges;
The following error occurred:
Communications link Failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has no received any packets from the server. Java.net.ConnectException:Connection Refused:connect
At this point, you need to log in to the server and set up your MySQL and restart MySQL as follows
Vim/etc/mysql/my.cnf
Configure the bind-address inside = 127.0.0.1
This one changed to Bind-address = 0.0.0.0
Cancel MySQL Server binding to the address!
Save exit after (Wq)
Sudo/etc/init.d/mysql Restart (restart MySQL service) or sudo service MySQL restart
Client connection to MySQL error