Bug #6891 Server Configuration Wizard issues Error 1045 : security could not be applied
Submitted: 30 Nov 2004 10:44 Modified: 30 Nov 2004 18:56
Reporter: [ name withheld ] Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:mysql-4.1.7-essential-win.msi OS:wxp pro latest sp etc.
Assigned to: CPU Architecture:Any

[30 Nov 2004 10:44] [ name withheld ]
Description:
When I install mysql-4.1.7-essential-win.msi it always end up with the following screen :
**********************************************
MySQL Server Instance Configuration Wizard
MySQL Server Instance Configuration
Configure the MySQL Server 4.1 server instance.
Processing configuration...

/ Prepare configuration
/ Write configuration file (c:\Program ... \my.ini)
/ Start service
x Apply Security settings

The security settings could not be applied.
Error Number 1045.
Access denied for user 'root'@'localhost' (using password:NO)
**********************************************
Interestingly enough I do provide a password but it seems it is not used by the wizard.

How to repeat:
Install mysql-4.1.7-essential-win.msi under win xp pro.
Keep all default values.

I get a 100% success rate on this one :-(

Suggested fix:
Apply security settings or else explain how to apply manually.
[30 Nov 2004 18:56] MySQL Verification Team
I wasn't able to repeat on my XP box. Yeah, you can resolve the issue
manually, please go to:

http://dev.mysql.com/doc/mysql/en/Windows_installation.html

and then you read the below items:

2.3.10 Starting the Server for the First Time
2.3.11 Starting MySQL from the Windows Command Line
2.3.12 Starting MySQL as a Windows Service
2.3.13 Testing The MySQL Installation
2.3.14 Troubleshooting a MySQL Installation Under Windows
[28 Feb 2005 19:37] [ name withheld ]
I have this same issue.  When I go through the installer, I enter the root pw and then it tells me that it cannect to the server to configure it using root@localhost using password = NO. 

Note: Was upgrading from 4.0 to 4.1 when this occured.

OS: Windows Server 2003
[9 Mar 2005 14:18] Bart de Best
Installing MySQL 4.1.7. on Windows XP SP1 and Windows W2K SP3 and SP4 works fine.

However after upgrading my OS from Windows XP SP1 to XP SP2, I cannot install MySQL 4.1.7. anymore and get the same result as Bug #6891.
[25 Jun 2005 0:52] [ name withheld ]
Same problem.  Can anyone tell me how to work around this, so that I can get mysql safely installed?
[29 Jul 2005 14:46] Graham Jeffery
I too get the same problem, using Windows XP SP2 and MySQL-4.1.13.

The most annoying part is that the Configuration Wizard just hangs, and nothing I can do (apart from restarting) can get rid of the window on the screen. If I try to close, or use Task Manager to shut the process down, it refuses to go away.

However, MySQL appears to have been installed, but without a password on the root account. But it's easy to set it manually.
[29 Oct 2005 8:35] Freek Bos
Okay,

The last post helped me a lot actualy.
I have two pc's with both MySQL4.1 installed. And I'm absolutely not a MySQL geek. Actualy I've been working with MySQL for only two weeks.
When I upgraded to 5.0 I got the same error over and over again.
Very frustrating. Took me hours to find out what had happened.
But the solution is very simple.
The configuration wizard does not apply the new password so it leaves the root password blank.

So when you start the MySQL command line client.
You simply press ENTER when asked for a password.

Now you can change the password by running the following line.
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');

This did the trick for me. Everything is up & running again.
Hope this will help you guys.

greetz...
Freek
[22 Jan 2006 20:56] Merci Smith
Thanks so much!  The same thing happened with my install.  It hangs on the last 'security' procedure.
  
OS Windows XP Pro, MySQL version 5.0.18-nt

I shut down my PC (rudely, since the config window won't close), restarted and followed the instructions for setting the password the MySQL command line client 

1. Pressing enter at the password prompt, and resetting it as follows:
2. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Pass');
[27 Oct 2006 2:51] Paul Angelo
This is amazing!!  I am a TOTAL rookie.  I managed to find this thread with google search of "the security settings could not be applied error 1045"

Funny, I did the set password through the command line with my new password, then I went to the windows config.

At that point I tried blank and the current and then put my desired password.  Somehow everything went good with all checkmarks coming up.  So my novice mind say's "Duh, why was I typing in my old root password as the current password when I haven't even set a root password in the first place?"  Blew away HD, yet thought that old password was set.

Dumbass.
[8 Jun 2007 16:39] Frank Di Maria
I'll go you one better. I ran a google on 'error number 1045', and this thread was the second link to come up! =)

Anyway, yep the problem still occurs on WinXP with the 5.0 installer, and the solution/observation here that the root password is blank and can (and SHOULD) be reset upon first login is still valid.
[16 Sep 2007 16:48] Kanwar Dhaliwal
I have the same issue as described above.

After the configuration wizard locks up by giving me error:1045, I start the MySQL command line client and press ENTER when asked for a password,  but the command line client exits on me.

Somehow, this seems to be a compatibility issue between my OS (Win XP Pro SP2) and mysql 5.0.45.

Any help would be appreciated.  Thanks!
[16 Sep 2007 16:55] Kanwar Dhaliwal
Ok.  So I reinstalled after deleting the MYSQL directory under program files and it worked!
[11 Oct 2007 2:01] lee wei
use mysql software to login mysql DB always met problem can't connection to trading instance.
server host:192.168.90.13:3306
user:wfuser/wfuser
[23 Nov 2007 17:52] lingani tshuma
i recently installed MySQL 5.0.45 on windows XP and on running the server configuration wizard i get the following error on applying security settings:

These security settings could not be applied
Error Number 1045
Access denied for user 'root'@'localhost'(using Password:YES) 

someone help me 

Links
[23 Nov 2007 18:41] lingani tshuma
ok i'v tried every suggestion and nothing seems t o work.
i'v tried reinstalling and removing MySQL files in program files and it doesnt seem to work i'm now getting yet another error

The security settings could not be applied
Error Nr 2003
Cant connect to MySQL server on 'localhost(10061)'

can someone tell me how to remove the data directory manually since it seems like it can't be removed automatically.
Also entering a blank password on the MySQL Command Line Client didnt work.
I'm optimistic that this error can be solved and i have to get over it now so any help is appreciated.
[7 Dec 2007 15:24] S D
Please Go to -> Control Panel -> Windows Firewall -->Add Port

Add port 3306 to be allowed through Firewall, do this before you configure

Worked for me
[4 Apr 2008 10:44] Anders Øyvind Urke Sætre
Hi. 

I met the problem too, but the solution is most likely in this thread.

- Uninstall.
- Remove MySQL-folder. (By trying to do this I noticed 2 mysqld-nt-processes running. Kill such and delete folder).
- Reinstall and hope for the best.

Of course, those of you patching an existing mysql might shiver by the thought of this. As one said, mysql seems to be installed, but the root-password ain't saved, thereby leaving it blank. If you manage to reset this (I didn't in my pitiful attempt) I bet you're back on track.
[20 Apr 2008 3:40] Daniel Blumenthal
Win XP, Version 5.1 (Build 2600.xpsp_sp2_qfe.070227-2300 : Service Pack 2)
MySQL 5.1.24RC installer
When my installer gets to the last step it hangs.  Below is the .err file.

InnoDB: The first specified data file D:\mysql\datafiles\ibdata1 did not exist:
InnoDB: a new database to be created!
080419 23:33:33  InnoDB: Setting file D:\mysql\datafiles\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080419 23:33:34  InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080419 23:33:35  InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
080419 23:33:36  InnoDB: Started; log sequence number 0 0
080419 23:33:36 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
080419 23:33:36 [Note] Event Scheduler: Loaded 0 events
080419 23:33:36 [Note] c:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: ready for connections.
Version: '5.1.24-rc-community'  socket: ''  port: 0  MySQL Community Server (GPL)
080419 23:33:37 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
[5 May 2008 6:09] Newbie MySQL
I am getting the same error as reported by Daniel Blumenthal.  MySQL Version 5.1
[9 May 2008 5:57] David C
I am responding to Daniel Blumenthal's Post with a possible solution - at least with a solution that worked for me. The steps pertain to a person using Windows Vista. Please note, I am not an expert, so if there is an expert out there who can improve/change this process please do so.

1. Stop the mysqld.exe process.
(a. First I went to the start button, then programs, then MySQL, then MySQL System Tray Monitor. This opens a circular cog icon in the task bar [bottom of screen] which I right clicked. In the resulting menu I ensured MySQL was stopped.
b. I held ctrl alt delete to open task manager found the mysqld.exe process and ended it.)

2. Start the mysqld.exe process with the --skip-grant-tables option
(a. I went to the start button, then programs, then Accessories, then right clicked the command prompt item and chose "Run As Administrator". A black screen should open with something like C:\Users\Computer> 
b. Type cd/ then press enter. [Our goal will be to navigate to the folder which contains the mysqld.exe application. For me it was in C:\Program Files\MySQL\MySQL Server 5.1\bin.]
c. Type cd Program Files/MySQL/MySQL Server 5.1/bin  then press enter.
d. Type mysqld.exe --skip-grant-tables then press enter.
Leave this window open. It will be locked to further typing however.)

3. Start the MySQL client with the -u root option.
(a. Just like the steps in 2 above, I went to the start button, programs, accessories, opened the command prompt with a right click as administrator, then typed cd at the C:\Users\Computer> prompt, then cd Program Files/MySQL/MySQL Server 5.1/bin and enter.
b. Then I typed  mysql.exe -u root   and then enter.
We are about to alter the password, for the sake of argument let it be abc123
c. I then typed  UPDATE mysql.user SET Password = PASSWORD('abc123') WHERE User = 'root';   then enter
d. I then typed FLUSH PRIVILEGES;  and then enter.)

4. Close the command prompt windows, and you may need to end the mysqld.exe process before you can use the query browser (or other client application) I did. 
That's all. You probably don't need to configure the instance, but I did anyway, and it didn't hang at step 4!

I hope this works for you or some other person whose been unable to resolve this awkward issue.
[11 Jun 2008 8:44] Sapna Salian
I had be trying since the past 2 days...Finally tried the last solution given by David C. It worked!!Thanks!!
[3 Jul 2008 17:46] Jack Schwartz
[22 Jan 2006 21:56] Merci Smith

Thanks so much!  The same thing happened with my install.  It hangs on the last 'security'
procedure.
  
OS Windows XP Pro, MySQL version 5.0.18-nt

I shut down my PC (rudely, since the config window won't close), restarted and followed
the instructions for setting the password the MySQL command line client 

1. Pressing enter at the password prompt, and resetting it as follows:
2. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Pass');

THIS WORKED FOR ME TOO!!!
[23 Feb 2009 14:09] Anders Monemar
God, you guys saved my day, my customers day and my bossed day! Thank you! 

And for ****'s sake, could somebody in the MySQL team have a look at this issue? This has occured on two machines running XP (dell latitides D630, clean xp installs) for us. Since the workaround suggested here is so simple, should your install script be able to accomodate it.

Anders, Sweden
[16 Apr 2009 4:52] leonardo fontani
hello people. I have the 5.1 version and the 1045 error problem. I try everything you mentioned. Try enter when console ask for password and it exists. try to do in DOS and it not let me set the password, giving me the same error. What can I do, what can I do? please someone  helpme
thanks

leonardo f
[14 May 2009 18:31] Matt Wegrzyn
Wow, this bug has been logged as can't repeat?

This bug must be fixed. The Enter fix posted above has done the job for me, thank you.

MySQL PLEASE fix this. I have problem with MySQL 5.0.81 on Windows 2003 Server Standard Edition x64.
[4 Jun 2009 2:19] Chonathun V
I couldn't connect to my database server so I tried to reinstall everything and got this problem. This bug tip is useful. I remove all MySQL program and then mannually delete MySQL folder. (If anyone couldn't delete mysql folder, go to control panel/administrative tools.../services/... and then find MySQL service and stop it before you delete this folder) Reinstall the server and I found this error. I try to click on "back" button and then delete the current password. and then click next again befor execute it. It worked!

I couldn't agree more on that MySQL should bug ages ago.
[18 Aug 2009 4:53] Lakshmi Subramanian
THIS WORKS FOR ME!!! YAY! Thanks Freek Bos!

[29 Oct 2005 10:35] Freek Bos 
Okay,

The last post helped me a lot actualy.
I have two pc's with both MySQL4.1 installed. And I'm absolutely not a MySQL geek. Actualy
I've been working with MySQL for only two weeks.
When I upgraded to 5.0 I got the same error over and over again.
Very frustrating. Took me hours to find out what had happened.
But the solution is very simple.
The configuration wizard does not apply the new password so it leaves the root password
blank.

So when you start the MySQL command line client.
You simply press ENTER when asked for a password.

Now you can change the password by running the following line.
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');

This did the trick for me. Everything is up & running again.
Hope this will help you guys.

greetz...
Freek
[30 Oct 2009 2:50] kandarp patel
Freek Bos.
Thank you so much.
I have wasted 4-5 hours and finally i tried with your trik it works now.

Thank you so much..
[15 Jun 2010 8:57] Paul Anderson
Downloaded the latest version to install on windows - mysql-essential-5.1.47-win32.msi

I had run this several times only to be greeted with the problem login failed for root@localhost.  I tried countless articles on found searching google - but nothing worked.  I am running on Vista Service Pack 2.  In the end I just uninstalled and deleted everything in C:\Program Files\MySQL and C:\ProgramData\MySQL.

Andez
[9 Oct 2010 7:41] bala murugan
hai My name is BalaMurugan.iam using windows xp and i installed mysql 5.1 same error occured(Not Applying Security settings). so did cancel . then i used reconfigured using remove old instance and i EXECUTE , un installed and i removed mysql folder in program files then i deleted in documents  settings\all users\aplication data\mysql i deleted mysql folder. then i put manullay in windows fire wall set port number for mysql 3306 then i restarted system then installed it works . this is solution i found in 2 days. hope u got answer for this error. ENJOY.....
[9 Oct 2010 7:47] bala murugan
here balamurugan.All User will display only u would give folder option to unhide 

once uninstalled delete all the folder not prior to delete folder what i mention back ...ENJOY and
[14 Oct 2010 10:03] G G
Hi all,

This bug appeared for me after I've removed the first instance and used the config wizard again. 
The solution was for me to use the same password as the first time.

Cheers
[10 Feb 2011 14:54] digger j
Hi 

My operating system is Windows 7 and I was trying to load mysql-5.5.9-win32.msi. While loading I didn't had any issues. after loading my programs menu in the START, only shows it as "MySQL Instance Configuration wizard" and is not showing any thing else.

I executed the wizard and it goes fine loading, but again nothing shows up except the same - "MySQL Instance Configuration wizard". 

I tried, changing the directory path for loading, removed the mySQL service, cleaned the registry, providing the same password, executing the software as administrator, removing the mySQL folder from Programdata.

not sure why its not loading in my system - Windows 7

Could someone please help me out here?
[26 Feb 2011 7:42] Prateek Jauhari
I m not a expert,
But I was facing the same issue.

Uninstall

Clear all the folder of mysql left after uninstallation and May Be Just Try Installing a fresh copy of MySQL server

If It shows error at step 4 while configuring the instance
Click cancel

and start your query browser
create a new connection using the password provided earlier.
may be you will be able to login and start your server.

Hope this might work.
[3 Apr 2011 2:39] Virginie Domguia
MySQL Server Instance Cofig.

WHile I try to install MySQL, everything is fine. But when I try to configure Instance Wizard it gave me these Errors in the last while executing. Below are the Error Details... "Could not start mysql service"

After reading many post I  have try all of it, but at the end, I realise that "Server Instance configuration wizard" does not appear on the start menu. I can just find "Client command line" and not "Server Instance configuration wizard".

can someone help me to solve this problem?
thank

Please help me figure out these problems.
[13 Jan 2012 1:06] Owen Yates
I'm running Windows XP SP3 and I have been tussling with this issue for years, and it's an extremely annoying one. For some reason some builds don't have this issue while others do. I was running 5.1.46 for ages because no other revision would apply the security settings correctly. After much looking around I finally figured the best way was this: [Im currently running 5.5.20 btw]

After install run the Instance Configuration Wizard
When it won't connect for 'Apply Security Settings' then Skip and close
Open a command prompt [Start Menu -> All Programs -> Accessories -> Command Prompt]
Go to the install directory [c:\Program Files\MySQL\MySQL Server 5.5\bin] in my case
type 'mysqladmin -u root password ????'
type 'mysqladmin -u root -p -h localhost' and enter a password when prompted
Go to the install directory [c:\Program Files\MySQL\MySQL Server 5.5] and edit the my.ini file
Add the line 'bind-address=0.0.0.0' [I couldn't connect via the loopback [127.0.0.1] due to is referring to itself as 'localhost'] and save.
Go to Start Menu -> Run and type 'services.msc' and hit enter
Find the MySQL service, stop and start it again

After that everything appears to work fine, hope that saves you some frustration.
[13 Jan 2012 1:18] Owen Yates
Just read above post, the 'Instance Configuration Wizard' can be run from the executable [MySQLInstanceConfig.exe] which is found inside the bin directory of your installation.

Probably [c:\Program Files\MySQL\MySQL Server X.X\bin]
[20 Feb 2012 21:11] HANDERSON GOMES
I was able to move forward on this step once I run the MySQLInstanceConfig.exe from an administrator account:
-> Right Click on %MYSQL_HOME%\MySQL Server 5.5\bin\MySQLInstanceConfig.exe
-> Run as Administrator

I hope it helps.
[18 Mar 2012 9:05] Andres Carvajal
Hello all,

I had the same problem installing mysql-5.5.21 on Windows 7 32bit.
It happened after the initial installation failed (froze).

I tried many things on this thread without success.

What I did was:

Uninstall

Remove mySQL folders from "program files" and "program data"

Run ccleaner and cleaned the registry (deleted all registry entries related to mySQL).

Install again

SUCCESS :-)
[1 Jun 2012 13:50] Jobin T Philip
This problem occurs because of the existance of old database instance in the system. The ways to fix this is explained in the following blog post.
http://phpladder.blogspot.in/2012/06/mysql-server-windows-applying-security.html
Hope you find it useful.