Recently the server database collapsed, depressed, found a lot of methods, also did not solve. Roll over these methods. After the server has been open for some time, MySQL automatically hangs up ~ does not want to restart to solve the problem, suggest novice or with MYSQL4. X version, 5 is really not perfect. In addition, this kind of problem can not be solved by a simple method. Hope that other people who have this problem can be inspired ~ ~ ~ Description 1: Server configuration: Win2003, serv-u6.0, mysql-4.0.24, php-4.3.11, sql2000 After the server has been running for some time, the PHP Web site does not open, prompting the can ' t connect to MySQL server on ' localhost ' (10055) error. Restarting the MySQL service has no effect and only restarts the server. But after a few days, this error occurs again.
My My.ini configuration content: #This File was made using the Winmysqladmin 1.4 Tool #2005-6-26 16:53:57
#Uncomment or ADD only the keys, that's know how works. #Read the MySQL Manual for instructions
[Mysqld] Basedir=c:/mysql #bind-address=192.168.13.81 Datadir=c:/mysql/data #language =c:/mysql/share/your Language Directory #slow Query log#= #tmpdir #= #port =3306 #set-variable=key_buffer=16m [Winmysqladmin] Server=c:/mysql/bin/mysqld-nt.exe User=root password=%%% --------------------------------------------------------------------------------
Description Two: Can ' t connect to MySQL server on ' localhost ' (10055) (2003) Can ' t connect to MySQL server on ' localhost ' (10048) (2003)
My system is 2003, my MySQL for a period of time will repeatedly appear above the error .... Reboot is good, but after a while the problem comes again ... Related Research direction
Description Three: My MySQL has always been wrong, prompting ' localhost ' (10055) Error! Look at the log, this is the prompt: -------------------------------------------------------------------------------- Mysql:ready for connections Mysql:ready for connections Cannot initialize InnoDB as ' Innodb_data_file_path ' is not set. If you don't want to use transactional InnoDB tables, add a line Skip-innodb To the [mysqld] sections of init parameters in your MY.CNF or My.ini. If you want-InnoDB tables, add to the [mysqld] section, for example, Innodb_data_file_path = Ibdata1:10m:autoextend But to get good performance-should adjust for your hardware The InnoDB startup options listed in sections 2 at Http://www.innodb.com/ibman.html 050621 13:25:20 mysql:normal shutdown 050621 13:25:20 Mysql:shutdown Complete Mysql:ready for connections -------------------------------------------------------------------------------- What do you mean, please? And after each error, you have to restart the machine to be good. If you just restart the MySQL service, it won't work.
Workaround Reference (online) One: I think it may be the landlord of some of the program write a problem, may occupy the connection and not disconnected. In addition, the landlord's MySQL server is not installed a firewall? In particular, Norton Firewall, I have encountered, obviously allow my IP access to the protected server, but after a period of time, I think that my IP is illegal attack, automatically give me IP sealed, or wait 20 minutes (the default rule), or the new boot server is good ....
Second: This article uses caution, after I change, the view always appears the server internal error You are using the Windows operating system, and this error is related to a registry key value of TcpTimedWaitDelay. Reducing tcptimedwaitdelay time in Windows resolves such problems, which by default is 240 (this is also the case if not set). This setting needs to be set to the following location in the registry: Hkey_local_machinesystemcurrentcontrolsetservicestcpipparameterstcptimedwaitdelay If the registry does not tcptimedwaitdelay this item, increase this item and set it to double-byte (DWORD) type. The value is set between 30 and 60.
Three: Server FTP test completed, restarted a bit. Everything is stable. But there are still a few questions that are not clear. Heart is not assured.
1. In the Friday, when the FTP pressure is not large, 30 minutes online statistics of more than 900 people, 10% of the ratio of MySQL connection failed the 10048 error. 2. The connection method I was using was mysql_connect (). How the server Iis+php+isapi. After referencing some information, I immediately changed the Mysql_connect () method to the Mysql_pconnect () method, when the problem seemed to be solved. 3. In Saturday, the server started the FTP stress test. The 15% ratio has 10048 10055 errors with MySQL connection failure. A 10055 more error than the last time.
The key does not know the 10048 10055 error code specifically represents the error message. It should be said that the question still did not find the exact answer.
I opened the serv-u, there are 4 sockets connected, MySQL immediately hang the Data Mining Research Institute
Four: Can ' t connect to MySQL server on ' localhost ' (10048) Can ' t connect to MySQL server on ' localhost ' (10055) MySQL version 4.0.13-nt
Server: Windows2000 server + iis5.0 + PHP ISAPI + MySQL
I developed a Web site with Php+mysql, which has a high level of access. But after one weeks of normal operation, the can ' t connect to MySQL server on ' localhost ' (10048) error began to occur frequently.
The statistical data are as follows: Attempt failed number of links 10,594 Total number of links per hour 885.37 % 15.91%
As you can see, the ratio of connection failures is very high. It should be emphasized that a week ago, the same number of links did not appear so high error rate.
Cause analysis: Use the FPort tool to view, you will find someone is running out of your database connection. And it is clear that they are characterized by dozens of connections from the same IP and are TIME-WAITK
Solution:1. It is recommended to modify the maximum number of connections, or to change the mysql_connect () method to the Mysql_pconnect () method, 2. Symptoms, block these IPs, an IP connection greater than 3 is a bit abnormal, sealed 3. Fix the root, modify the site program, strictly forbid to refresh too fast! Additional instructions: You can block the external connection to the local 3306 port directly in the firewall! |