MySQL user at any host doesn't work, needs localhost in some local personal computer development environments

By Benjamin Melançon
on 03 Sep
0 comments

Description

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

 

Post new comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <small> <pre> <strike> <sub> <sup> <kbd> <s>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.