Home  >  Article  >  Database  >  What should I do if mysql cannot connect to localhost?

What should I do if mysql cannot connect to localhost?

coldplay.xixi
coldplay.xixiOriginal
2020-06-23 13:30:1912325browse

What should I do if mysql cannot connect to localhost?

#What should I do if mysql cannot connect to localhost?

Solution to the problem that mysql cannot connect to localhost:

1. Check whether the firewall allows port 3306, and click Management Tools--Advanced Security Firewall-- Inbound Rules--Create a new rule.

What should I do if mysql cannot connect to localhost?

2. Click on the port

What should I do if mysql cannot connect to localhost?

3. Set the port number to 3306

What should I do if mysql cannot connect to localhost?

4. Allow connection--write the name as you like. For example: allow inbound port 3306

What should I do if mysql cannot connect to localhost?

What should I do if mysql cannot connect to localhost?

##5. Then The administrator runs the command prompt (win R) cmd

Start the database net start mysql and then try to connect!

Recommended tutorial: "

sql video tutorial"

The above is the detailed content of What should I do if mysql cannot connect to localhost?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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

Related articles

See more