Vista, Access denied for user 'root '@'localhost'

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Vista, Access denied for user 'root '@'localhost'

Postby vaalsh » 09. July 2010 15:23

I am newbie,
in http://localhost/security/ have set password for root.
phpMyAdmin authentication: coockie.
Set a random password for the phpMyAdmin user 'pma': Yes
I didn't change XAMPP DIRECTORY PROTECTION.

Still get the access problem.

Any help greatly appreciated!

Val.
vaalsh
 
Posts: 4
Joined: 09. July 2010 10:49

Re: Vista, Access denied for user 'root '@'localhost'

Postby JonB » 09. July 2010 21:41

A - where did you install XAMPP?

B - is the Access Denied when you are trying to start phpMyAdmin or at some other point?

thanks
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Vista, Access denied for user 'root '@'localhost'

Postby vaalsh » 10. July 2010 13:30

Thank you!

I didn't install it in the root, so, I reinstalled it and now it is in C:\\xampp.

Unfortunately, I have a new problem now:
In control panel I can't start Mysql - it shows message "MySQL service started" in the bottom window, but no message "Running"
and button Admin is dimmed.

???

Val.
vaalsh
 
Posts: 4
Joined: 09. July 2010 10:49

Re: Vista, Access denied for user 'root '@'localhost'

Postby vaalsh » 10. July 2010 17:49

OK, now all services working, so I got the original problem:

When I am trying to access DB, I get " Access denied for user 'root '@'localhost' "

I tried to set up passwords in config.inc.php, it didn't work, may be I have to change admin->privilege, to access the database?

Thank you,

Val.
vaalsh
 
Posts: 4
Joined: 09. July 2010 10:49

Re: Vista, Access denied for user 'root '@'localhost'

Postby JonB » 11. July 2010 13:51

Basically you are on the right track now. Change PW in database, then configuration files

read this topic, I explained it to another user, all the correct steps and syntax are given.

viewtopic.php?f=16&t=41148

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Vista, Access denied for user 'root '@'localhost'

Postby vaalsh » 11. July 2010 18:55

I used your recommendations, still getting same error.

But, I found solution:

$link = mysql_connect("localhost:3306",$username,$password)


Thanks a lot!

Val.
vaalsh
 
Posts: 4
Joined: 09. July 2010 10:49

Re: Vista, Access denied for user 'root '@'localhost'

Postby ckdoublenecks » 11. July 2010 22:23

I really hope this can be resolved here because I have tried forums, friends
and much trial & error and have spent weeks and several delete and reinstalls trying
to make this work.
When I enter "localhost", I click OK (shows username and password) to proceed.
This brings up the Xampp main page. Below is the error message I get when I
try to access phpMyAdmin from the main page:
===================================================================

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

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.

below is the phpmyadmin config:
==========================
<?php

$i=0;
$i++;
$cfg['Servers'][$i]['user'] = 'charlie';
$cfg['Servers'][$i]['password'] = 'cookie';
cookie
$cfg['Servers'][$i]['auth_type'] = 'config';
?>

below is where I think the area to be compared is in MYSQL my.ini:
===================================================
# CLIENT SECTION
#
[client]
port=3306
[mysql]
default-character-set = utf8

# SERVER SECTION
# ----------------------------------------------------------------------
#
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306

#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:\AppServ/MySQL"

#Path to the database root
datadir="C:\AppServ/MySQL/data/"

***********************************************************************
****** I've changed the "AppServ" above to "xampp" in both instances*******
***********************************************************************


Clicking "status" brings up the below:
=======================================================
These XAMPP pages are not accessible through the network by anyone SECURE
The MySQL admin user root has a password SECURE
PhpMyAdmin is freely accessible by network UNSECURE
PhpMyAdmin is accessible by network without a password. The configuration 'httpd' or 'cookie' in the "config.inc.php" can help.

I tried the "fix" link - changing passwords, even leaving it blank ('d rather not have one as this is in house)
Double your music - double your fun
ckdoublenecks
 
Posts: 16
Joined: 11. July 2010 22:10
Location: Florida

Re: Vista, Access denied for user 'root '@'localhost'

Postby JonB » 12. July 2010 00:56

If you haven't done much, I'd suggect just re-installing in c:\xampp. The XAMMP setup has a tool for relocating XAMPP, I'm not sure if there is anything to break if you rename the installation folder, but I suspect there are some settings written out that get kaboshed in the process.

The only thing that really has to be uninstalled for XAMPP is the installer itself. XAMPP doesn't touch the Windows registry, so it can bascially just be deleted after you save anything you want.

if you install XAMPP clean, there will be no password on 'root' for MySQL. In fact, at that point XAMPP is set to work on localhost with basically no security.

I have no idea why you are getting this:
shows username and password


You are working on the machine XAMPP is installed on, right?

:?:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Vista, Access denied for user 'root '@'localhost'

Postby ckdoublenecks » 12. July 2010 01:32

I am running windows 2000 Prof. and I have removed everything with the prefix "xmapp" except the installer, even the desktop shortcut and reinstalled several times. Everything seems to be working except for the password issue. I have a shortcut to my site which is xampp\htdocs\myfilefolder\myfile. If I click on the control panel shortcut, it shows only apache running and I notice that the little icon in the tolbar is not there today. Yesterday it was there with the center square at one time and later the square was gone. As I said it is absent now. Oh yea, occasionally, during other programs a message presents itself that xampp has created an error and the system must be restarted? This seems to be one hell of a system and I'd really like to get it up and going. I was just stating in my last post that I get a password page (shows username and password) - and yes, just one computer.
Double your music - double your fun
ckdoublenecks
 
Posts: 16
Joined: 11. July 2010 22:10
Location: Florida

Re: Vista, Access denied for user 'root '@'localhost'

Postby JonB » 12. July 2010 02:50

A - What username and password do you need to put in?
If its your Windows credentials, that is the login screensaver doing that (has nothing to do with XAMMP)

B - if you are getting error messages that 'XAMPP' has caused a problem (error - that is the XAMPP control panel - not Apache or MySQL. You should look in the Windows System Event Log to see the details.

C - Was MySQL ever installed before or is it currently installed in a standalone mode? If so, that could be causing a problem. Realisitcally, there can only be one MySQL service on a server.

D - on that old a system its nearly inpossible to tell what might be wrong, so I would begin by using the Control Panel to un-install the XAMPP installer or in the Start Menu, locate XAMPP and use the Unintall XAMPP option.

Now that I know you have Windows 2000 - I'll point out you don't have the same problem as teh orginal poster, so you should have started a new Topic. Anyone else with your problem would NOT look in this topic, because its about VISTA!

Good Luck
:)


SF
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Vista, Access denied for user 'root '@'localhost'

Postby JonB » 13. July 2010 16:48

User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 53 guests