Apparently, I can connect to MySQL (at least from my localhost) without having to provide any username or password. I can even put anything as username, as long as the password is empty. I have access to the
test databases. I can create tables. If I run
SELECT USER() it returns the proper value randomstring@localhost, where the random string is whatever I used for username when I connected.
mysql.user table contains root@localhost, firstname.lastname@example.org, @localhost and pma@localhost. I manually set encrypted passwords to all the records (
UPDATE user SET password=...) and only root has any privileges, the other two records have "N" for all privileges. That record with the empty username looks suspicious, but I don't think it has anything to do with this and I think it was there from the beginning.
To make matters worse, if I add a user with a password, I can only connect using empty string as password (just like if I put anything as username). If I try to connect using the username I created and password I supplied when creating it (
CREATE USER .. IDENTIFIED BY ..) it doesn't work.
Does anyone know what is wrong and how I can fix this?
Note: I am using MySQL 5.5.16 for Windows, provided by the XAMPP package.