Home ›
MySQL user at any host doesn't work, needs localhost in some local personal computer development environmentsMySQL user at any host doesn't work, needs localhost in some local personal computer development environments
Submitted by Benjamin Melançon on September 3, 2008 - 7:03pm
Where the user, password, and database are all "xmp".
ben@blackbox:/var/www/xmp$ mysql -u xmp -pxmp xmp < IMPORT_THIS_TO_YOUR_XMP_DB.sql
ERROR 1045 (28000): Access denied for user 'xmp'@'localhost' (using password: YES)
i can't even get that to work
Solution: it was the weird thing where telling it to allow the connection from % (any host) doesn't work when you use localhost
i think I had the problem on XAMPP, and Alan had it on Bitnami or whatever, and now on our Ubuntu box. Very very weird
i changed it in phpmyadmin -- replaced the % with localhost and said delete the old account and reload all privileges
ben@blackbox:/var/www/xmp$ mysql -u xmp -pxmp xmp < IMPORT_THIS_TO_YOUR_XMP_DB.sql
same command worked now
Comments
strange, but documented
I had this exact same problem. It turns out that the default Any@'localhost' is overriding your 'xmp'@'%'. You can delete your Any users or be more specific about the domain of the user.
It's very counter-intuitive, but it is documented (here):
Thanks!
Another mystery explained...
Thanks!
Hello, thanks for the info
It just worked like charm!!!
^____________^
Additional info to next readers:
This solves slow xammp/wammp connections. I don't know why but when I use this solution, it just worked and everything went well!
Thanks!
Post new comment