accidentally deleted user root

Problems with the Windows version of XAMPP, questions, comments, and anything related.

accidentally deleted user root

Postby Jenn » 26. April 2010 22:19

hello,
i'm using xampp on my machine. firt in phpMyAdmin i accidentally deleted the user root.
now when i click on phpMyAdmin to go to my databases it gives me this error:

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

if i choose the Open new phpMyAdmin window and enter root and my password there it will open the phpMyAdmin. and i see the user root in privileges.

now i dont know if the user root is back and i dont understand why i can not open the phpmyadmin through xampp

plz help :?:
Jenn
 
Posts: 2
Joined: 19. September 2009 16:56

Re: accidentally deleted user root

Postby Force_Form » 09. May 2013 02:29

I have this exact same problem, and have not been able to solve it yet. If I find something that works I will link it back.
Force_Form
 
Posts: 1
Joined: 09. May 2013 02:26
Operating System: Windows 7

Re: accidentally deleted user root

Postby hackattack142 » 14. May 2013 03:13

Hello,

This is fairly easy to do.

Open Notepad and paste the following into it:
Code: Select all
@echo off

echo "GRANT ALL PRIVILEGES ON *.* TO root@localhost " > CreateRoot.sql
echo "IDENTIFIED BY 'password';" >> CreateRoot.sql

C:\xampp\mysql\bin\mysqld.exe --no-defaults --bind-address=127.0.0.1 --bootstrap --console --standalone <CreateRoot.sql >nul

del CreateRoot.sql

pause

Change password to whatever password you want to set
Change the path to mysqld.exe if you did not install xampp to 'C:\xampp'

In Notepad:
1. File -> Save As..
2. Set 'File Name' to 'reset.bat'
3. Set 'Save as type' to 'All Files (*.*)'
4. Save to a location you can get to easily (say the desktop)

Now, make sure MySQL is not running and run this batch file.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 139 guests