Bug #24215 setup on win fails
Submitted: 11 Nov 2006 17:20 Modified: 16 Apr 2008 16:12
Reporter: Carl Karsten (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.0.27-win32 OS:Windows (win XP)
Assigned to: Iggy Galarza CPU Architecture:Any

[11 Nov 2006 17:20] Carl Karsten
Description:
mysql-essential-5.0.22-win32.msi - "can't connect to port"

I got this a few times.  I fumbeled around, and some how got past it.

my guess is the script starts the server then tries to connect, but the server isn't fully started yet, so the connect fails.  if you go back, the script tries again, but now fails to start the server because the server is already started.  

How to repeat:
2.Get the server: http://www.mysql.com/  Downloads, Current Release, Windows Essentials 15.9M, Pick a mirror, Register (name and address) "[Hoobly Classifieds / Chicago, IL] HTTP"

3.mysql-essential-5.0.22-win32.msi – double click it.

4.Welcome next, Typical next, Install – create an account (just do it)

5.[x] Configure Server Now, next

6.Welcome next, Detailed next, Developer next, Multi Functional Database, Select path next, “Decision Support (DSS/OLAP)  20 connections Next, 

7.[x] Enable TCP/IP Networking  (this does create a security issue.) [x] Enable Strict Mode, Next 

8.Standard Character Set Next

9.[x] Install as Windows Service, [x] Launch the MySQL server automatically Next

10.[x] modify security settings – New root password – make something up: FUDG, don't forget it. (do not enable root from other machines.) next 

11.Execute – watch it do stuff, Finish.  

get a dialog saying "can't connect to port"
[11 Nov 2006 17:34] Carl Karsten
I added XP to the OS.
[12 Nov 2006 2:28] Carl Karsten
Ok, it isn't 'that' simple - it requires 3 steps:

install, set root pw to X
uninstall
install, set root pw to Y

get this error dialog:  

http://dev.personnelware.com/carl/temp/Nov11/a/mysqlInstErr1.png

(ocred ver, not really worth fixing)

The secur_ty sett_ngs could notbe appI_edtothe database becausethe connect_on
hasta_Ied w_ththetollow_ng error,
ErrorNr,1045
Access den_edtorusertoofelocalhosflus_ng password: NO)
Ita personalt_rewalI_srunn_ng onyour mach_ne,please make sureyou have opened
the TCP port3306torconnect_ons, Otherw_se no cI_entappI_cat_on can connectto
the server,Atteryou have openedthe portplease pressIRetry_to applythe secur_ty
s ett_n g s,
It y o u are re__n stalI_n g atter y o u iu st u n_n stalle d th e M y S Q L s erv er ple a s e n ote th at th e
data d_rectory was notremoved automat_cally,Theretorethe old passwordtrom your
Ia st _n stallat_o n _s st_II n e e d e d to c o n n e ct to th e s erv er, In th_s c a s e ple a s e s ele ct s k_p
now andre_runthe Cont_gurat_on W_zardtrom the start menu,

This was on Win2K running in a VM - very clean:  just the os and vmware tools.

using mysql-essential-5.1.12-beta-win32.msi
[12 Nov 2006 20:39] Carl Karsten
bit more on this:

I tried to back up and use the original root pw (X), but ran into a different problem:

X Start service
Cannot create Windows service for MYSQL. Error: O
screen shot: http://dev.personnelware.com/carl/temp/Nov11/a/mysqlInstErr3.png

Looking at Services (Widnows Control Pannel, admin tools, services) I see that MySql is already started.  so I can see why it would fail, but I would call this a bug too.  I think when the installer failed to "Apply security settings" it should have stopped the service.  

However, even that doesn't seem to be enough.  I hit back, use "net stop mysql' to stop the service, hit 'execute' and get the same error.  "net stop mysql' again says "The MySql service is not started" which makes me think the installer is still trying to install the service, not start it as the "Start service" implies.  it is however consistent with the error "Cannot create Windows service..."

So, I have 2 recommendations: 

1. deal with root passwords from previous installs better.  I am actually not sure what better is.  I am assuming we don't want to overwrite previous data, so maybe if it detects it, it needs to tell the user: either delete the previous data, or enter the previous root password. 

2. add some options to the installer to deal with this situation better.  maybe a dialog behind an "advanced options" button that would have some options to start/stop the server, or "skip starting" or "check server status" or something to help get the installer back on track.
[14 Nov 2006 9:04] MySQL Verification Team
Thank you for the bug report. Are you tried actually the latest released
version 5.0.27?. Thanks in advance.
[14 Nov 2006 14:29] Carl Karsten
> tried the latest released version 5.0.27?

trying that now - however:  I got the same error on what was current in June, September and now mysql-essential-5.1.12-beta-win32.msi - so unless it got fixed, then broken again....

using mysql-essential-5.0.27-win32.msi on the VM that I installed mysql-essential-5.1.12-beta-win32.msi on,  and I can't get though the install - 

"A Windows service with the name MySQL already exists.  Please uninstall this service correctly or choose a different name for the new service."

This is a different bug - do you want me to open a 2nd report?

Given this mess, I will try again with a fresh win install andmysql-essential-5.0.27-win32.msi .
[14 Nov 2006 14:30] Carl Karsten
screen shot that was to be part of the previous post: 

 installed mysql-essential-5.1.12-beta-win32.msi , the uninstalled. now trying to install 5.0.27 and get "A Windows service with the name MySQL already exists.  Please uninstall this service correctly or choose a different name for the new service."

http://dev.personnelware.com/carl/temp/Nov14/a/mysqlinsterr1.png
[14 Nov 2006 15:03] Carl Karsten
clean w2k VM mysql-essential-5.0.27-win32.msi  - install, configure with pw X, uninstall, install, config with pw Y, error.
[15 Nov 2006 7:56] MySQL Verification Team
Thank you for the bug report.
[11 Feb 2008 21:04] Iggy Galarza
Marked Bug#18556 a duplicate of this one.
[1 Mar 2008 22:08] Trudy Pelzer
This bug is more than 1 year old. Please 
reverify; it may have been fixed in the
interim. Thanks.
[3 Mar 2008 22:24] Iggy Galarza
Confirmed this is still a bug.
[12 Mar 2008 14:57] Patrick Crews
Ok to push.

Verified that the instance config wizard will detect the presence of an existing password (such as described in the bug reporters scenario) and will present the user with an input box for entering this password (in order to change to a new password, etc).  Previously, only the 'new' and 'confirm' password inputs were presented -- even if there was existing password data.

One suggestion would be to present the user with the option of removing this data on an instance removal (via the instance config wizard) to help prevent this or possibly presenting the user with more information on how to remove these files manually -- for example, they might not remember the previous password, etc.  Just suggestions.
[16 Apr 2008 16:12] Paul DuBois
Noted in 5.0.60, 5.1.24, 6.0.5 changelogs.

If a user installed MySQL Server and set a password for the root
user, and then uninstalled and reinstalled MySQL Server to the same
location, the user could not use the MySQL Instance Config wizard to
configure the server because the uninstall operation left the
previous data directory intact. The config wizard assumed that any
new install (not an upgrade) would have the default data directory
where the root user has no password. The installer now writes a
registry key named FoundExistingDataDir. If the installer finds an
existing data directory, the key will have a value of 1, otherwise it
will have a value of 0. When MySQLInstanceConfig.exe is run, it will
attempt to read the key. If it can read the key, and the value is 1
and there is no existing instance of the server (indicating a new
installation), the Config Wizard will allow the user to input the old
password so the server can be configured.
[24 Oct 2008 16:52] Joachim Bartels
Read through all of your comments - but the bug is still in existence in 5.1.28! Yes, there is a prompt for an old pw (and it happens, I know it ;-)), but I found no way to run the dialog to its end. The attempt to launch the mysqld-service is terminated (see above). Spent the whole day with hunting for a solution, but don´t know what to do *exactly*?
[3 Dec 2008 17:21] Iggy Galarza
Marked Bug#34633 a duplicate.