Home > Database > Mysql Tutorial > Let's talk about how to enable remote access in mysql

Let's talk about how to enable remote access in mysql

藏色散人
Release: 2022-01-26 11:35:28
forward
6481 people have browsed it

This article will introduce how to enable remote access in mysql. I hope it will be helpful to friends in need!

mysql enables remote access:

1. Open mysql server and set mysql access permissions

 mysql>grant all privileges on *.*  to  'root'@'%'  identified by 'youpassword'  with grant option;
Copy after login

Description: Root represents the user name. % represents all ip addresses, you can also set a specified ip address
2. After executing flush privileges;
3. Check the user table, you can see:
Lets talk about how to enable remote access in mysql

host The value is %, which means that when the root user logs in to mysql, any IP can be allowed to access the mysql server.
4. If the mysql management tool navicat is used, the database cannot be connected and an error number (10038) is prompted;
Solution :
Command to open

vi  /etc/mysql/my.conf
Copy after login

Change

 bind-address = 127.0.0.1
Copy after login

to

bind-address = 0.0.0.0
Copy after login

and then restart mysql Server: service mysql restart;

Recommended learning: "mysql video tutorial"

The above is the detailed content of Let's talk about how to enable remote access in mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
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