Passwords for root (localhost and 127.0.0.1)

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

Passwords for root (localhost and 127.0.0.1)

Postby Lk@zz » 28. November 2008 15:24

Hi

I have XAMPP 1.6.8. After installation, in MySQL database I have two root users (for host: localhost and 127.0.0.1). I set password for MySQL by
http://localhost/security/xamppsecurity.php After this, user root for localhost has password, but user root for 127.0.0.1 still hasn't got password (I try change it by: http://127.0.0.1/security/xamppsecurity.php, but it doesn't work). I'd like to ask: why one user root has password and second root doesn't have? Does XAMPP use only localhost and doesn't use 127.0.0.1 (so why there is host for 127.0.0.1)?

Thanks awfully for help.
Regards
Lk@zz
 
Posts: 1
Joined: 28. November 2008 15:01

Postby Sharley » 30. November 2008 05:40

localhost is the same as 127.0.0.1 - the local loop back address, only accessible on your own PC not from anywhere else.

So the same super user root and it's password you set in the security pages is used for both.

So if you go to:
http://localhost/phpmyadmin
You are asked for
Username root
Password rootpassword

If you go to
http://127.0.0.1/phpmyadmin
You are asked for
Username root
Password rootpassword

In my XAMPP installation I do have a host 127.0.0.1 with root and No password but I just followed what I typed above and could not access phpMyAdmin from 127.0.0.1 without I use the root user and it's password - so even though the MySQL database and the phpMyAdmin Privileges both say No password under host 127.0.0.1 for root user, you simply can't access with http://127.0.0.1/phpmyadmin without using root with a rootpassword if you have set one for localhost (same as 127.0.0.1) in the security pages.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 118 guests