if you are trying to connect to mysql this error occurs:
ERROR 1130: Host ‘192.168.1.3’ is not allowed to connect to this MySQL server
1. Change table method. Maybe your account doesn’t allow you to log in remotely, only at localhost. At this point, as soon as you log in to mysql on your localhost computer, change the “host” entry in the “user” table in the “mysql” database, and change the “%”
from “localhost”
mysql -u root -p
mysql> use mysql;
mysql> update user set host = ‘%’ where user = ‘root’;
mysql> select host, user from user;
2. Authorization method. For example, if you want myUser to use MyPassword to connect to a mysql server from any host.
GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@’%’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;
if you want to allow user myuser to connect to mysql server from a host with IP of 192.168.1.3, and use mypassword as the password
GRANT ALL PRIVILEGES ON *.* TO ‘root’@’192.168.1.3’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;
p>
GRANT ALL PRIVILEGES ON *.* TO ‘root’@’192.168.1.3’ IDENTIFIED BY ‘1235’ WITH GRANT OPTION;
p>
mysql> flush privileges; This sentence must add!!
Read More:
- MySQL: if the remote connection using navicatip fails, prompt “is not allowed to connect to this MySQL server”
- Cannot connect to MySQL server on “host” (113)
- JDBC connect to Sql Server to connect to the database–The TCP/IP connection to the host localhost, port 1433 has failed
- MYSQL login error: mysqladmin: connect to server at’localhost’ failed
- MySQL local connection Error 1130_ The solution of MySQL 1130 error report when remote connection through Navicat for MySQL
- Can’t connect to MySQL server error 111
- ERROR 1148 (42000): The used command is not allowed with this MySQL version
- Sqlog connect to MySQL 8.0.24 remote server, error: 2058 solution
- The MySQL service suddenly hangs up with the error message can’t connect to MySQL server on ‘localhost’ (10061)
- The server just without updating PID file and can’t connect to local MySQL server through socket are solved
- Solution to MySQL Error 1130 problem
- It can’t connect to local MySQL server through socket ‘/ tmp/ mysql.sock ‘(2) “;
- CentOS Liunx 7 uses rdesktop to remotely connect to the Alibaba Cloud server and it appears Failed to connect, CredSSP required by server.
- Can’t connect to MySQL server on ‘192.168.64.132‘
- mysql problem solving: mysqladmin: connect to server at’localhost’ failed
- ERROR 2002 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
- Error 2003 (HY000): can’t connect to MySQL server on ‘localhost’ (10061)
- When MySQL is running, the server suddenly goes down, which causes Mysql to be unable to restart
- Navicat for MySQL error 1251 failed to connect to MySQL
- PHP connection to MySQL database error: call to undefined function MySQL_ connect()