phpMyAdmin #1045 error!

I get this error when I try to log in phpMyAdmin

#1045 cannot log in to the mysql server

can you post the actual error instead of some of it?

What do you mean? This is error

#1045 cannot log in to the mysql server

in general a 1045 error specifies which user can’t be logged in and it tells you with PASSWORD YES (meaning you’ve supplied a password and it is incorrect) or PASSWORD NO (meaning you’ve forgot to enter a password). It may be different with phpmyadmin, so I asked in case you’d only posted part of the error.

do you have access to mysql via the command line? if so try starting mysql there with the same user

have you made a recent password change for that user?

is this a standalone installation or are you using a host package where you’d enter phpmyadmin through CPANEL for instance?

Im using xampp and I changed configuration file… I went to conf.sample file then wrote a password and overwrite this over real config file

That information should be in your initial post, it will help those who you are asking assistance from.
So you’ve created a new user and password within the phpmyadmin config file or the mysql config file?
by default mysql runs as root within mysql without a password. you should add a password for the root user.
you then should create a new user and password for mysql and use that rather than root user.
you should create that same user and password in the phpmyadmin config file. then restart phpmyadmin.


Using a canned app, eh? Serves you right (but only because you’re not learning anything about the apps).

Okay, phpmyadmin has a particular quirk in that it’s configuration file,, is buried in the config subdirectory and MUST be properly setup for phpmyadmin to function properly. This is a SECURITY measure which should not be taken lightly. Get into that directory, configure your phpmyadmin settings correctly and you’ll be away with a great tool.

THEN, get a copy of Kevin Yank’s book and learn to setup your daemons yourself (so you can actually mirror what your host is providing and update individual apps on your schedule, not XAMPP’s schedule). Further, because I do NOT use canned apps like that, I am willing to believe that they do not provide upgrade paths, only a fresh install every time you need an upgrade - how ugly is that?


As the former TL for Hosting, I’ve got to thank you for admonishing 999 for the lack of useful information. It’s really nice for me not to be the gorilla in the board! You should see my Standard Rants (automated responses to common nonsense) with AutoHotKey!



Okay I reinstalled and installed again? Do I need to install phpmyadmin, because I already have one with xampp?

I think I dont need to install, because when I open MySql using xampp control panel, at the bottom it says that is not safe to use phpmyadmin without password set. So how to set password??