Changing user name and password

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

Changing user name and password

Postby SirChick » 14. August 2007 13:08

When i go to the security page it wont let me change the superuser which is Root to a different name cos i think some one might know my password and it would be less worrying if the user name was not root lol

I maanged to change one login username which was for xampp but if i go to the myadmin its always root as username which i dont know how to change
SirChick
 
Posts: 68
Joined: 19. June 2007 15:03
Operating System: Windows 7 64 bit

Postby SchermulyC » 01. February 2008 11:45

how to change superuser "root"

I hope to be correct - I have done this already one year ago
maybe I failed to remember to one or two points
if you will find a mistake, please let me know
thank you


A

stop Apache and services



B

make renamed backups of

/mysql/data/mysql/user.MYD
/mysql/data/mysql/user.MYI

example

/mysql/data/mysql/user_MYD.txt
/mysql/data/mysql/user_MYI.txt



C

delete

/mysql/data/mysql/user.MYD
/mysql/data/mysql/user.MYI
/mysql/backup/mysql/user.MYD
/mysql/backup/mysql/user.MYI



D

edit

/mysql/share/mysql_system_tables_data.sql

change "root" in the the lines

INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y', ...
REPLACE INTO tmp_user VALUES (@@hostname,'root','','Y','Y', ...
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y', ...

with "your_new_superuser_name"



E

edit

/apache/conf/extra/httpd-xampp.conf

change "root" in the the line

AuthMySQLUser root

with "your_new_superuser_name"

comment out this line by a #

# AuthMySQLUser your_new_superuser_name

otherwise your_new_superuser_name will take effect too early



F

edit

if used .htpasswd and .htaccess files or create new files



Note,
there are more preset superuser names (not "root"), e. g. in Mercury



G

start Apache and services (they should run without user and password)

include the edited

/mysql/share/mysql_system_tables_data.sql

in mySQL



H

stop Apache and services



I

edit

/apache/conf/extra/httpd-xampp.conf

uncomment the line

# AuthMySQLUser your_new_superuser_name

now your_new_superuser_name might take effect



J

restart Apache and services

to let take effect your_new_superuser_name



K

if your system should work,

delete the renamed backups of

/mysql/data/mysql/user.MYD
/mysql/data/mysql/user.MYI

and



L

delete or modify

/mysql/resetroot.bat

take care!
in case you will run it,
it will install again superuser root




done
User avatar
SchermulyC
 
Posts: 1
Joined: 01. February 2008 07:27


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 64 guests