Home > Database > Mysql Tutorial > body text

How to solve the problem that IP cannot connect to mysql

藏色散人
Release: 2020-10-26 15:32:47
Original
4180 people have browsed it

To solve the problem that IP cannot connect to mysql: first execute the command "grant all privileges on *.* to 'username'@'IP address' identified by 'password';" in Navicat tool; then refresh Just click the permissions.

How to solve the problem that IP cannot connect to mysql

Recommendation: "mysql tutorial"

MySQL native IP cannot be connected, so use localhost and 127.0. 0.1 can connect | Solution

1. Use the command in Navicat tool or other tools: (remove all ' single quotes)

grant all privileges on *.* to '用户名'@'IP地址' identified by '密码';
Copy after login

2. After executing the above command, use the following Use the command to refresh the permissions

flush privileges;
Copy after login

Specific instructions:

all privileges: All permissions can also be written as select, update, etc.

*.*: All tables of all libraries such as databasename .*

Username: The user name that needs to be logged in

IP: The IP address of the database

identified by 'password' means connecting by password

The above is the detailed content of How to solve the problem that IP cannot connect to mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template