[Last Call] Learn how to a build a cloud-first strategyRegister Now


MYSQL setup with XAMPP

Posted on 2008-11-05
Medium Priority
Last Modified: 2013-12-13
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.
Question by:blue-genie
  • 2

Accepted Solution

Valleriani earned 2000 total points
ID: 22883988
#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.

Expert Comment

ID: 22883992
If your trying to connect to your DB, again, the user is 'root'
LVL 39

Author Closing Comment

ID: 31513437
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 :-)

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month17 days, 16 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question