Can t connect to mysql tutorial server on Solution
Error No.: 2003
Problem Analysis:
Unable to connect to the mysql server, possible situation:
1. the mysql service is not started. It is generally caused by the failure of mysql to start in case of exceptions, such as no available disk space or incorrect basedir path setting of mysql in my. ini;
2. the mysql server cannot be connected due to insufficient resources.
Solution:
1. If you are a VM user (purchased space), contact the Space Provider to check whether mysql is enabled normally.
And confirm the mysql configuration information (whether it is localhost );
2. If you are an independent host user (with host management permissions), perform the following steps:
1) check whether the mysql service is started.
For windows host, right-click my computer, click manage, and find
Mysql service to check whether it is in the enabled status.
Solution to mysql 10061 Error
If "error 2003: can't connect to mysql server on 'localhost' appears'
(10061) ", indicating that your mysql has not been started.
Solution: Start the mysql service in the service
Can't connect to mysql server on 'localhost' (10055)
Solution, 1. We recommend that you modify the maximum number of connections or change the mysql_connect () method
Mysql_pconnect () method,
2. By blocking these ip addresses, a connection with an ip address greater than 3 is not normal,
Seal
3. Fix the problem and modify the site program. Refreshing is strictly prohibited!
Modify the number of links:
This error is related to a registry key value tcptimedwaitdelay. Reduce windows
The tcptimedwaitdelay time can solve this problem. The default value is 240 (if not set
This value ). To set this option, go to the Registry as follows: [hkey_local_machine]
[System] [currentcontrolset] [services] [tcpip] [parameters]
[Tcptimedwaitdelay] If the registry does not contain the tcptimedwaitdelay project, add this
Project, and set it to the double-byte (dword) type. Set the value to between 30 and 60.
Database tutorial Link error: can't connect to mysql server on 'localhost' (10060)
The operating system on the server side is Windows XP sp2, and 3306 is enabled in the built-in firewall (default end of mysql)
Port)
The firewall disables port 3306. Use iptable as an example.
Vi/etc/sysconfig/iptables
-A rh-firewall-1-input-m state -- state new-m tcp-p tcp -- dport 3306-j
Accept
Service iptables restart
Pstutorial: iptables settings
1) takes effect after restart
Enable: chkconfig iptables on
Close: chkconfig iptables off
2) takes effect immediately and becomes invalid after restart
Enable: service iptables start
Disable: service iptables stop