Search code examples
mysqlxampppasswords

XAMPP mysql access without password


When I access mysql database on my localhost XAMPP installation I usually type

mysql -u user -p

But today I accidentally mistyped it like this:

mysql -u user-p

And for my surpries got connected without any password prompt. I tried that with many users registered in mysql and it seems they all get opened like this. Is that a bug or vulnerability for XAMPP or is it the normal behaviour for the integrated shell application inside the control panel? And if it is the second, how can I change it because anyone else using my computer can easily access any database and table on my server?


Solution

  • quote : RajaRassani

    When you type mysql alone, I bet you'll be able to access the database still. I think the default installation has User=Any, Host=% Password=-- (you can check this in the Users tab of your PhpMyAdmin since you already have this with XAMPP)

    Actually it really appears to be user related issue, XAMPP adds too much useless users it seems... Thank you for helping!