Bug #12923 Solution found for constant 2013 error - security fails to install
Submitted: 1 Sep 2005 6:02 Modified: 4 Dec 2005 16:42
Reporter: Warren Lacefield Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0 OS:Windows (Windows XP,sp2)
Assigned to: CPU Architecture:Any

[1 Sep 2005 6:02] Warren Lacefield
Description:
Have used MySQL for years no problem on other PCs. Installing newest version on clean new Dell D800 running Windows XP, sp2. Prior installation of Apache and php working fine. Rest of pc appears to work fine.

During the final EXECUTE dialog during mysql install, message says security did not install, error 2013: Lost connection to mysql server during query. Server appears to be running fine and port 3306 is open. Using command line, all programs trying to access the mysql server report same error message 2013. Using mysql command line client, it asks for password, beeps at anything, flashes error msg, and goes away. No apparent problems in error log. Not supposed to be any passwords yet installed. I have completely removed mysql (including registry entries by hand) and reinstalled several times. Exactly the same error over and over again.

The amount of unhelpful information about this error message on the Internet is amazing. In Bug reviews, looks like others have had this same problem and been told it is a "support" issue (not a bug) and to go elsewhere to look for help. That is most "unhelpful" and causes great loss of confidence in MYSQL. I have already wasted about 5 days fiddling with this. Thank you. 

Warren Lacefield
Academic Software, Inc.
asiwel@acsw.com

How to repeat:
After install at command prompt:

C:\>mysql
ERROR 2013 <HY000>:Lost connection to MYSQL server during query

... constantly for every attempt to reach the server.
[2 Sep 2005 5:54] Valeriy Kravchuk
I tried to reinstall on XP + SP2 this morning once more - no problems. But (!) firewall was switched off on that machine.

So, please, check you firewall settings - connections should be allowed to port 3306 (if you used standard installation options). You may simply try to switch off your firewall and try to connect to MySQL once more. If it works, then you need to configure firewall settings properly.

Please, inform me about the results.
[2 Sep 2005 6:44] Warren Lacefield
Hi, Valeriy. Nice to speak to a real person! Thank you for your quick reply. I turned off Windows Firewall (the only one I think I'm running), even rebooted, and ran c:\>mysql from the command line and again received the same Error 2013. According to the adminstrative control panel (and error log), the mysql server is started and running fine.

I tried c:\>mysqladmin ping and got a slightly different result:
mysqladmin: connect to server at 'localhost' failed
error: Lost connection to MYSQL server during query

I tried using mysql Administrator 1.1.2 with the following dialog values:
Stored connection: new connection
Host: localhost
Port: 3306
user and password fields blank

dialog comes up saying:
Could not connect to specific instance
MySQL error 2013: Lost connection to server during query
To check network connection, click PING button

which I did and got back nice pings:
Reply from 127.0.0.1:Time 0ms TTL-64

seems to me server is running fine ...

I am using only the data folder that installs. But there are other data folders elsewhere on the hard drive - documentation said to backup and remove previous data folder (with real databases in it from my old PC) - I assume that meant simply to make sure the data folder is out of the path ...

my.ini looks fine to me, paths correct and all that...

Could this be a password problem? Could there somehow be or have been set a root password on this machine ... I did try to do that, of course, initially ... but it said security failed to install. Mysql is supposed to load with blank (no) password. Of course the mysqladmin new password command fails the same way with error 2013. Where is the mysql password anyway? --- somewhere in the data folder, I thought ... I certainly do not want to have to delete my current Windows password file.

Another thought - I am using Novell Client 4.90 sp1a - it often interferes with stuff, but not Apache or php ... not mysql either I thought.

Thank you for your continued help.  --Warren Lacefield, ASI
[2 Sep 2005 8:06] Valeriy Kravchuk
Please, deinstall (from Control Panel) the results of previous 4.1.14 installation, delete the installation directory (you was not able to put any real data in it, aren't you?), and try to install 4.1.14, this time without Firewall. 

I used to provide root password during installation. If it will be successfull, just execute:

mysql -uroot -p

from the command line.

It should work (worked for me several timers), but inform me about any results.

Please, check in the Task Manager the presence of mysqld-nt.exe process, and send me the results of netstat -a command, if this time installation will be unsuccessfull.
[3 Sep 2005 7:08] Warren Lacefield
Hi, Valeriy. Followed your instructions. Firewall is off. Before deinstall there was a mysqld-nt.exe process and a mysql service running. Removed mysql, mysqlOBDC, and mysql admininstrator using control panel Add/Remove programs. Deleted installation folder in Program Files. Shut down. Started up. (Did not manually delete registry entries, but checked to be sure no mysql process or service running now.)

Reinstalled, providing new root password.

Installation failed in EXECUTE dialog at the security stage with ERROR 2013 and warning that security settings were not installed. Clicked SKIP, reran Config from Start Menu, tried to re-configure instance. It asked for old password and fails to install security. But now there is a mysqld-nt.exe process and a mysql service running.

From the command prompt, running ...
c:\>mysql -uroot -p
Enter password: ******** (I do try the one I tried to set... have always used)
ERROR 2013 (HY000): Lost connection to mysql server during query

same old errorr ....

c:\>netstat -a   ... produced:

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    D800_Base:http         D800_Base:0            LISTENING
  TCP    D800_Base:epmap        D800_Base:0            LISTENING
  TCP    D800_Base:microsoft-ds  D800_Base:0            LISTENING
  TCP    D800_Base:1049         D800_Base:0            LISTENING
  TCP    D800_Base:3306         D800_Base:0            LISTENING
  TCP    D800_Base:netbios-ssn  D800_Base:0            LISTENING
  TCP    D800_Base:427          D800_Base:0            LISTENING
  TCP    D800_Base:1075         ffc.intellicast.com:http  TIME_WAIT
  TCP    D800_Base:1030         D800_Base:0            LISTENING
  UDP    D800_Base:microsoft-ds  *:*                    
  UDP    D800_Base:isakmp       *:*                    
  UDP    D800_Base:1025         *:*                    
  UDP    D800_Base:1045         *:*                    
  UDP    D800_Base:1759         *:*                    
  UDP    D800_Base:1948         *:*                    
  UDP    D800_Base:2967         *:*                    
  UDP    D800_Base:4500         *:*                    
  UDP    D800_Base:ntp          *:*                    
  UDP    D800_Base:netbios-ns   *:*                    
  UDP    D800_Base:netbios-dgm  *:*                    
  UDP    D800_Base:427          *:*                    
  UDP    D800_Base:1026         *:*                    
  UDP    D800_Base:1900         *:*                    
  UDP    D800_Base:ntp          *:*                    
  UDP    D800_Base:1031         *:*                    
  UDP    D800_Base:1043         *:*                    
  UDP    D800_Base:1059         *:*                    
  UDP    D800_Base:1900         *:*                    

I hope we are farther along toward diagnosing this odd problem.
Still suspicious it is somehow a password related error ....
I have had this PC little over a year. It IS slightly possible that I put a version 3.x.xx of mysql on it. If so, then that installation did work because we still use that database on a MySQL website (I thought that was another machine though.)
Back in November I tried to install mysql 4.0.xx on this machine also. That failed then with the same error as now and I just gave up on this PC then for mysql development. But I really need it to work now. Thanks.

--Warren Lacefield, ASI
[4 Sep 2005 8:50] Valeriy Kravchuk
According to this line form the netstat -a results:

TCP    D800_Base:3306         D800_Base:0            LISTENING

and your description, mysqld-nt.exe is started and waiting for the connections.

Is it possible for you to have older versions of user.MYD and user.MYI tables in the data\mysql subdirectory of the installation directory? What are the dates of their creation (should be the date you installed last time, really)?

Are you installing MySQL as a member of local Administrators group? Have you thried to install the same 4.1.14 on the other machine?

I'm asking all those silly questions because I am really not able to repeat the behaviour you described. I tried to reconfigure existing Instance of 4.1.14 with Config Wizard, and it works without any problems.

Please, send the content of my.ini file from the installation directory also (just want to check there is nothing special in it).
[5 Sep 2005 2:00] Warren Lacefield
Files requested by Valieriy Kravchuk helping to resilve installation bug

Attachment: WEL MySql Misc 1.txt (text/plain), 12.77 KiB.

[5 Sep 2005 2:01] Warren Lacefield
Hi, Valeriy. I am not surprised that you are not easily replicating this problem. After all, it should not be happening. It must be something specific to this machine and how it is configured (should be completely normal, though, whatever that is). I never questioned the distribution release which must work almost always exactly as expected. Still, others may be experiencing this difficulty as well. I will try installing mysql on my brand new just imaged office computer also running XP on Tuesday - probably will install fine, but I need it running on this laptop.

Doesn't appear to be a way to attach files to these comments. The C:\Program Files\MySQL\MySQL Server 4.1\data folder contains only the files installed by the most recent install attempt. These include the mysql and test folders, the .err and .pid files and the 3 ib files (each initially allocated 10,240KB). The id_logfile1 is dated 9/3/2005 as are the two folders. The other files are dated 9/4/2005, I guess as results of continued attempts the next day on my part to contact the server.

Oh, I see ... the Files tab, OK. See attached WEL MYSQL Misc 1.txt file.

------
All this stuff looks good to me  ....

Am I installing MYSQL as a member of a local administrators group? Honestly I don't know what you mean by that question. This is a corporate computer. I am supposed to have administrative privilleges but the IT Dept does also. But there are other profiles on this PC, including another "administrator" account that I don't control (for the Novell network access and automatic system updating and other stuff set up by the IT department). So maybe I am a member of a local administrators group. That has never interfered with anything before - including Apache, FTE programs, etc.

Again, the point of failure appears first with inability of the installer to alter/configure etc the security settings .. which is why I continue to wonder about password-related problems.

Thank you. -- Warren Lacefield, ASI
[5 Sep 2005 2:05] Warren Lacefield
Valeriy. I may have misread your info request. The date for the files inside the data\ folder is 8/17/2005 ..... which appears to be about the date of release for version 4.1.14  --- in other words these files came with the download.
[5 Sep 2005 6:47] Valeriy Kravchuk
Warren,

You had not answered my question:

"Is it possible for you to have older versions of user.MYD and user.MYI tables in the data\mysql subdirectory of the installation directory? What are the dates of their creation (should be the date you installed last time, really)?"

So, I tried to ask about the date of creation of these 2 files only (in the data\mysql subdirectory). They should be updated during installation (password for root user is stored in this table).

You may try to stop MySQL server, copy the files I'll atach (from my working copy of 4.1.14, with root user password being "root", the same as user name), start the server and try to connect to it. This may solve your problem.
[5 Sep 2005 6:48] Valeriy Kravchuk
user table with standard root/root user account

Attachment: user.MYD (application/octet-stream, text), 332 bytes.

[5 Sep 2005 6:49] Valeriy Kravchuk
and it's index...

Attachment: user.MYI (application/octet-stream, text), 2.00 KiB.

[5 Sep 2005 18:11] Warren Lacefield
Well, Valeriy. Maybe we are getting closer. As I meant to say in my last note, all of the files including the user.MYD and .MYI files in the C:\Program Files\MySQL\MySQL Server 4.1\data\mysql folder were dated 8/17/2005. In other words, none of these files had been changed by the installation process. In particular, they were not dated the date I installed the last time. (After all, security changes failed during installation.)

I turned off the server (one time using the Control Panel Adminstrative Tools/services and a second time by using the Server Instance Configuration Wizard). Each time I copied the new user.MYD and user.MYI files (dated 9/5/2005 1:32pm) you sent me into the ..\mysql directory.

Neither way worked. Simply restarating the service failed with error 2013. Then I tried to reconfigure the server w/o changing security. The second time I had to recreate the whole instance and used root as the new password.

None of these efforts worked. Security installation or change still failed. Error 2013. Interestingly, however, none of the ..\mysql files have been altered - the dates and times for the MYD and MYI files remain the same - i.e. 9/5/2005 1:32PM. So ... evidently they are not being updated during installation ... wonder why not.
[5 Sep 2005 21:46] IZILLI
Hi Warren,

On XP SP2, did you try to stop the "IIS ADMIN" service and configure it to "Manual" because this cause a conflict with the localhost MySQL is trying to use to start the MySQL Service and to apply security settings...

Tell me what happen then.
[6 Sep 2005 3:39] Warren Lacefield
Hi, Izilli. I did not know about IIS ADMIN services, but after a quick Google review, that looked like something reasonable to do. I am running XP Pro, sp2, with all the updates, etc. However, no service named IIS Admin (or anything close) appears to be running on this PC. (The MySQL service was there, Apache was there, dozens more services are running ... but not IIS ADMIN). My CuteFTP Pro program runs fine, etc. So what next? Thank you.

(So far, after a year, lots and lots of software, clean diagnostics, etc .... only the MySQL installation procedure is giving me any sort of trouble on this PC.)

--Warren Lacefield, ASI
[6 Sep 2005 9:39] Valeriy Kravchuk
Still have no ideas on how to repeat it. 

By the way, tried to substitute USER.* files uloaded here for the previous ones, restarted MySQL service, and it worked. All these on XP with SP2...

Please, if you have time, try fresh installation (after compete uninstall) into a non-default location (like c:\mysql), and try to use non-default port (3307, for example). Inform us about the results.

If it still does not work, I'll recommend to try other versions (5.0.12 or wait for 4.1.15 release) and inform us about the results. 

As you can see, there is nobody else reporting this same bug.
[6 Sep 2005 18:59] IZILLI
Hi Warren,

IIS Admin is your local server used by Frontpage for exemple when you build web pages for a personal website on your local computer. It comes with XP Pro (whatever the SPx you use).

MySQL use your localhost to start its Service but in my case (like yours) my localhost was already used by the IIS Admin service.
I recommend you to read the full procedure I've already written for an other Id (see 6672) or search under "Installation" string search criteria.

Hope this will help.
[6 Sep 2005 21:35] Warren Lacefield
Well, Izilli, I am not sure what to make of your comment. As I said, there does not appear to be a service named IIS Admin running on this computer. Likewise, Frontpage is not installed either. (I use HotDog). To my knowledge, Frontpage is NOT part of Windows XP .... humm, maybe you mean IIS Admin ... yes, that is part of XP but honestly I sure can not find it running on this computer ...

"Localhost" is the name of the Apache webserver, I thought. That is, 127.0.0.1, I think. (I just installed MySQL on another office desktop computer and it appeared to work fine. ... but not on this PC I use all the time ...)

Anyway, I read Bug Note 6672 - that person was having difficulty actually starting the server. My server seems to start up and work fine. What fails is the 4th step in the sequence where the security settings are supposed to be installed. There I get error 2013 and continue to get that error for any and every attempt to access that server thereafter.
[7 Sep 2005 23:10] IZILLI
Hi Warren,

ok, I will suppose that your MySQL server has been started and work fine. So i'll try to reproduce your error and give you the result soon.

Regards.
[8 Sep 2005 6:10] Valeriy Kravchuk
Warren,

If you still want to install MySQL on this particular machine (I suppose so), please, try fresh installation (after compete uninstall) into a non-default location (like c:\mysql), and try to use non-default port (3307, for example). Inform me about the results, please.

If it still does not work, I'll recommend to try other versions (5.0.12
or wait for 4.1.15 release).
[9 Sep 2005 0:18] Warren Lacefield
Valeriy, Izilla. You certainly have tried to help. Following your last suggestions, I completely de-installed MySQL and removed all components except for a few registry entries. I re-installed using a custom installation, a different install directory C:\mysql and a different port 3307. Before doing this I made sure Windows firewall was off and no mysql service was running.

What happened was exactly what has happened over and over again. The installation went fine, followed then by the initial configuration wizard which leads to the final EXECUTE dialog. The first three steps complete, starting the service. Then a dialog box named CONNECTION ERROR pops up with a long message beginning "The security settings could not be applied to the database because the connection has failed with the following error: " ERROR 2013 .... Lost connection to server during query". So next thing I do is click the SKIP button. The failure to install security is again reported in BOLD face along with the error text in the EXECUTE dialog box. And that is the end of it. Attempts to reconfigure the server instance fail the same way if you try to modify security settings ...

Now I just successfully installed mysql using this very same download file on my office computer, so I do know what success is supposed to look like. However, failure replicates perfectly on this relatively new DELL D800, which runs fine apparently otherwise.

I did however discover another interesting "bug". For some reason the MySQL manual.chm file that comes in the DOCS folder with this download package is only about 1.2MB in size and fails to open as a compiled HTML Help file. So I went to the mysql.com site and downloaded that manual file from DOCUMENTATION. This downloaded version is 3.627MB and works fine.

Obviously there is some setting on this computer interfering with the mysql installation. Is there no way to do a trace or something to get an install log to pinpoint the failure?
[14 Sep 2005 19:11] MySQL Verification Team
I was unable to repeat on my Dell Box and XP Pro. The behavior reported
it happened to me when my firewall had a slower speed for to launch
the permission dialog screen, resolved that problem or disabling the firewall
I don't have anymore this issue.
[19 Sep 2005 3:36] Warren Lacefield
I have still had no luck with this computer. I removed mysql 4.1 and tried beta version 5.0 with exactly the same problem. Further study leads me to believe I was wrong earlier. It is the server instance itself that is not working properly. I can with difficulty shut the service down and restart is using mysqld --console from the command line prompt. I get a message saying the server started successfully. But then from a second command line window, any command that attempts to access the server returns with a 2013 error message (and a similar message is printed in the "console" window). I can ping the server. If I try to telnet into the mysql server and port from a command window, that fails as well with a message that flashes off the screen too fast to read. This happens no matter what port I try to use. The server is running and watching port 3306 - but it will not accept any connection. I have tried to figure out ways of tracing all this but haven't made much progress.
[4 Dec 2005 16:42] Warren Lacefield
Well, this problem certainly took long enough to solve. Evidentally I did have a "firewall" type program called "SafeFTP" running and enabled in the background on this computer. It certainly prevented MySQL programs from connecting with the "localhost" MySQL 5.0 server, which was running fine.

Thank you all for your assistance. -- Warren Lacefield, ASI