Home >Database >Mysql Tutorial >What should I do if SQL cannot connect to the server?
Solution: 1. Check whether tcp/ip is enabled and pay attention to the port number; 2. Check the network problem; 3. Use the telnet command to check the port status; 4. Check the server item. Whether the username and password are correct; 5. Check whether the server allows remote connections.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
When you cannot connect to the database, check the following items:
1. Network conditions. Check if tcp/ip is enabled and note the port number.
Open SQL SERVER Configuration Manager and check the network configuration
2. Ping the server address to check network problems.
#3. Use the telnet command to check the port status.
#If there is a problem with the network, check the firewall settings, or try turning it off first.
4. Check the server items. Is the username and password correct?
5. Whether the server allows remote connections, check the security after logging in with Windows authentication->Login name->Login username->right-click properties, click Status:
6. Right-click the server name->Properties->Security, start two authentication modes
The above solves the problem of being unable to connect to the database .
Related learning recommendations: mysql tutorial(video)
The above is the detailed content of What should I do if SQL cannot connect to the server?. For more information, please follow other related articles on the PHP Chinese website!