MYSQL setup with XAMPP

Hi, i haven't used xampp in about 3 years.
I now set it up to do some quick testing for PHP.
My Apache is running, mysql is running.
i left everything at defaults but i'm getting the error
#1045 - Access denied for user 'localhost'@'localhost' (using password: NO)

so after looking around at some other posts, i changed auth_ytp in the config.inc.php file to HTTP and added a password  abc.
now when i run localhost i get a pop up requesting username and password, i then see the list of databases on the left but the error still exists.

i'm not a d/b or php expert, if someone could please assist.
LVL 39
blue-genieAsked:
Who is Participating?
 
VallerianiConnect With a Mentor Commented:
#1045 - Access denied for user 'localhost'@'localhost' (using password: NO)

I believe it the main account is root, not localhost, so like #1045 - Access denied for user 'localhost'@'root' (using password: NO) seems to be trying to connect to localhost, on a user called localhost, which isn't there in defaults.

So if you want to get in mysql:
1. Open a command prompt
2. Go to the folder with mysql bin (C:\xampp\mysql\bin for example)
3. Type: 'mysql -uroot' (Without the quotes, and if you put a password on root it would be mysql -uroot -ppassword).

phpmyadmin should already be setup, all you need to do is login, but if you change passwords and such of mysql, then you need to edit this file: C:\xampp\phpMyAdmin\config.inc.php for example, or where you installed it. But normally it uses the PMA account.

If your using winmysqladmin, which is absolutely horrible, you just type in 'root' for user.
0
 
VallerianiCommented:
If your trying to connect to your DB, again, the user is 'root'
0
 
blue-genieAuthor Commented:
hi i thought i deleted the question.
it turns out i was fiddling with stuff but i actually needed to restart the stuff before it kicked in.
not sure what happened by it seems to be working now (its one of those I don't know how I got it to work and I'm not going to risk breaking it again).
i did try the -uroot in command prompt earlier and that also told me i didn't have permissions.
thanks for the info, as i go along i'm sure you'll hear alot more from me. are you a PHP expert? if yes i have a new question coming up.
thanks :-)
blu.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.