0

I'm new to xampp, and have it installed on a Windows 7 machine. Earlier, I was able to at least get the login page for phpMyAdmin, but it was not taking username of "root" and no password, so I changed the username and password in the config.inc.php file, but now I don't even get the login page.

This is the message I get: "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."

Also, I changed the config.inc.php.safe file to have the same settings, and took the comment off of the "bind-address="127.0.0.1" in the my.ini file.

I want to make sure that the way I have my virtual host in httpd-vhosts.conf is not the problem (I don't know enough about it to tell):

NameVirtualHost *
<VirtualHost *>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot "C:\xampp\htdocs"
ServerName mygrafica.com
<Directory "C:\xampp\htdocs\mygrafica.com">
Order allow,deny
Allow from all
</Directory>

Thanks in advance!!!

Grafica
  • 103
  • 2
  • 6

1 Answers1

1

You need not change bind-address, since all this lives on the same box.

What you DO need, however, is mysqld listening on port 3306 on localhost, and a user that phpmyadmin can use to log on.

The first can be checked with netstat -an, look for port 3306.

The second is a bit more involved and requires you to log on to mysql first:

mysql -u root -p root_password

This will require a GRANT for that user, something like:

mysql > GRANT ALL ON *.* TO 'phpmyadmin'@'127.0.0.1' IDENTIFIED BY 'some_password';

And configure phpmyadmin to use those credentials.

adaptr
  • 16,576
  • 23
  • 34
  • To expedite time, so that I can answer you right away, how do I tell if mySQL is listening on port 3306? – Grafica Mar 08 '12 at 15:24
  • In what file is "netstat -an" located? – Grafica Mar 08 '12 at 15:38
  • Okay, you're not going to have much success running network services if you don't know how to open a command line... – adaptr Mar 08 '12 at 15:39
  • I'm learning. You started somewhere too. – Grafica Mar 08 '12 at 15:40
  • I'm looking for port 3306... – Grafica Mar 08 '12 at 15:42
  • I get " TCP 127.0.0.1:3306 0.0.0.0:0 LISTENING" – Grafica Mar 08 '12 at 15:45
  • excellent, so connectivity is not the problem. – adaptr Mar 08 '12 at 15:46
  • For Step 2, do I type "mysql -u root -p root_password" in command line? – Grafica Mar 08 '12 at 15:48
  • It appears I already set a username and password for phpMyAdmin, but forgot I had done that a couple of months ago. Here is what worked: stopped mySQL from xampp control panel, opened xampp/mysql/resetroot in command line, typed mysqladmin -u root password new, restarted mySQL from xampp control panel, clicked on Admin for mySQL, and was able to log in with "root" as username and no password. – Grafica Mar 08 '12 at 18:01