Home > Database > Mysql Tutorial > Example to explain how to modify mysql to allow remote connections

Example to explain how to modify mysql to allow remote connections

小云云
Release: 2017-12-22 14:34:10
Original
1656 people have browsed it

Regarding the issue of mysql remote connection, when we work in the company, we often encounter the mysql database stored on someone's computer. If we want to connect to the mysql service, the computer with the mysql service must enable remote connection. This article It mainly introduces in detail the method of modifying MySQL to enable remote connections. It has certain reference value. Interested friends can refer to it. I hope it can help everyone.

The first step, use dos to connect to your database, (I am talking about win here)

Then select the system Library, mysql

Command: use mysql, of course you can also see which libraries have been created in your mysql

Then select mysql

and execute the command to modify permissions: GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;

This sentence is a very critical sentence

After execution, clear the cache

ok Basically

If you don’t worry, you can also check it

Now on your machine mysql If the database is on a local area network, it can be accessed by others.

Related recommendations:

Detailed examples of steps to configure MySQL remote connection under Alibaba Cloud

How to set up remote connection to the database for MySQL?

How to open a remote connection in MySQL?

The above is the detailed content of Example to explain how to modify mysql to allow remote connections. 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