Jump to content
The Uniform Server Community

#1045 Access Denied


Recommended Posts


The first time I ran the Uniform Server, I changed my mysql password, and now whenever I do something to change the password or go into the account via PHPMyAdmin, it gives me this:



MySQL said: Documentation

#1045 - Access denied for user 'root'@'localhost' (using password: YES)

I have read the other post btw, but it does not really help me.


Happens with both my desktop and laptop. I really need some help.

Link to comment
Share on other sites

Password recovery:


Method 1


a) Close servers

;) Open file mysql_password located in folder *\Uniform Server\udrive\home\admin\www

c) Delete the old password and enter your new password.

d) Start the servers. From apanel select MySQL Server Configuration the new password will be picked up if not enter your new password

e) Finally click the change button and all should be OK.


Note: The same password must be used in each of the above steps.


If the above fails use method 2 :blink:


Method 2:


Reset Uniform Server to a know state. (default) or to a new password.


Step 1) phpMyAdmin - Set root password


To access the MySQL server phpMyAmin uses the root password this it picks up from a file. Before doing anything else edit the file to contain the new password (root) as follows.


1. Stop the servers

2. Open the file mysql_password in a text editor

3. File is located in folder: *\Uniform Server\udrive\home\admin\www

4. Delete the contents and enter new password: root (do not press enter otherwise you add a line feed)

5. Save file


Step 2) MySQL - Set root password


The MySQL server requires restarting with skip grant table option set, this bypasses any security allowing access to the server. A new password is set and grant tables updated. The following method uses two command windows and task manger before following each step start the servers using Server_Start.bat I will assume the server is running on drive W.


Kill process:


Open windows task manager by pressing ctrl, alt and del keys together. In the window that opens click on the Process tab (default) scroll up or down and locate the file mysqld-opt.exe right click on this and select End Process click Yes to confirm kill process.


Restart MySQL server:


The MySQL server requires restarting (from MySQL console) with skip grant table option set as follows:


1. Start a command prompt: (Start > click on Run > type cmd click OK)

2. Type following lines into the command prompt:


cd usr\local\mysql\bin

mysqld-opt --skip-grant-tables --user=root Note: Do not copy and paste you must type it in.

3. Note the flashing cursor indicating server is running. Minimise this window (do not close it).


Step 3) Set Password and Update grant tables:


Start a second command prompt set new password (root) and update grant tables as follows:


1. Start a command prompt: (Start > click on Run > type cmd click OK)

2. Type following lines into the command prompt:


cd usr\local\mysql\bin


USE mysql;

UPDATE user SET password=password("root") WHERE user="root";

flush privileges;


3. That's it finished.


Step 4) Final steps (Kill process and restart):


1. Kill the process mysqld-opt.exe see section above, close command prompt windows.

2. Stop the servers using Stop.bat close your browser.

3. Start the servers using Server_Start.bat

4. From apanel run phpMyAdmin.

Under Uniform Server check Server version: 5.0.41-community-nt

Confirms the update was successful.


Resetting the server to a known condition requires a large number of steps if you do make a mistake repeat all steps from the beginning.


All the best

Ric :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...