Home > Database > Mysql Tutorial > What should I do if MySql cannot connect to the local address localhost?

What should I do if MySql cannot connect to the local address localhost?

藏色散人
Release: 2020-07-17 10:54:10
Original
19876 people have browsed it

Solution to the problem that mysql cannot connect to localhost: 1. Check whether the IP address can be pinged; 2. Check whether the firewall allows port 3306. If not, set the port number to 3306; 3. Start the database Just run the command "net start mysql" to try to connect.

What should I do if MySql cannot connect to the local address localhost?

Recommendation: "mysql tutorial"

First method: Check whether the IP address can be pinged, if so Look at the second one

The second one: check whether the firewall allows port 3306, management tools--Advanced Security Firewall--inbound rules--new rule


Click on the port


Set the port number to 3306


Allow Connection - write whatever name you want, for example: allow inbound port 3306


Then the administrator runs the command prompt (win R) cmd

Start database net start mysql Then try to connect!

The above is the detailed content of What should I do if MySql cannot connect to the local address localhost?. 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