Using mySQL, the database keeps thinking I'm ''@'localhost' even though I've already signed in as '(username)'@'localhost'.
It gets stranger:
I'm allowed to create databases called 'test', 'test_db', etc. and tables within them, but if I try to create a database with any other name, I get a:
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'someDB'
I've already logged in as 'username'@'localhost'. Why does it think I'm ''@'localhost'?
Perhaps this is relevant?
mysql> select user(), current_user();
+------------------+----------------+
| user() | current_user() |
+------------------+----------------+
|username@localhost| @localhost |
+------------------+----------------+
1 row in set (0.00 sec)
This becomes increasingly annoying as I try to use SQL within Java. It seems as soon as I log in it forgets that I've logged in as (username).
I've read somewhat about how usernames and login names are different? Why is user() different from current_user()? I think these might be clues... Any advice, friends?