#1045 - Access denied Help :(

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

#1045 - Access denied Help :(

Postby HelpJuan » 20. July 2011 17:37

I am completely new to making websites and I'm also new to Mac (read: don't know how to use terminal) but still I wanted to give XAMPP a shot.
So everything was going great until I tried to change the security setting on phpmyadmin. There were three root users with different hosts, and I gave each one of those a password under the edit privileges. When I then tried to go back to phpmyadmin, I got this error:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)

I looked at various threads and tried different things (as much as I could understand) and played around with Config.inc.php. Eventually I managed to change the error to
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
But now I am stumped. I've tried going though Terminal, but I don't know how to use it to flush the password. Right now, my Config.inc.php is as follows...

* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'MYPASSWORD'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'MYPASSWORD';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
//$cfg['Servers'][$i]['controluser'] = 'pmauser';
//$cfg['Servers'][$i]['controlpass'] = 'MYPASSWORD';
/* Advanced phpMyAdmin features */
//$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
//$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
//$cfg['Servers'][$i]['relation'] = 'pma_relation';
//$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
//$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
//$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
//$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
//$cfg['Servers'][$i]['history'] = 'pma_history';

/*
* End of servers configuration
*/

/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>

I've tried to change the 'blowfish_secret', '['Servers'][$i]['password'], and ['Servers'][$i]['controlpass']. I typed the same password between the ' ' 's that I did in phpmyadmin earlier, but to no avail. But I don't really understand what any of it is, so don't know what I am doing wrong. I unisntalled XAMPP and reinstalled but nothing... I'm stumped.

Thanks for all your help.

Juan
HelpJuan
 
Posts: 1
Joined: 20. July 2011 17:17

Re: #1045 - Access denied Help :(

Postby jobrew » 29. July 2011 00:28

I am having the same problem, getting the same 1045 error*, but instead of getting the error when I tried to access phpmyadmin, I get the error when I try to access some web pages (like, index.php) that used to work fine before I set passwords for everything using /Applications/XAMPP/xamppfiles/xampp security. Some of my other my other web pages in the same directory with .php extensions work fine. I checked to see if file permissions weren't correct but they were set to 644, so I'm confused why some pages work and some don't.

If you get an anwer to your original post maybe it will help both of us.

Thanks for any help you can give.
JoAnne

* #1045 - Access denied for user 'root'@'localhost' (using password: NO)
jobrew
 
Posts: 1
Joined: 29. July 2011 00:06

Re: #1045 - Access denied Help :(

Postby apachenewb » 29. April 2012 21:25

I'm having a similar problem...

I've discovered that if I delete XAMPP and reinstall it, I'm able to access phpmyadmin.

However, I'm alerted with "Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user '.root'."

But if I do create a password, I'm immediately locked out and get the "#1045 - Access denied for user 'root'@'localhost' (using password: NO)" and the corresponding message "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".

Does anyone know how I can correct this? Many thanks, I've been wracking my brain on this for two days now.
apachenewb
 
Posts: 1
Joined: 29. April 2012 07:39
Operating System: Mac OS X 10.5

Re: #1045 - Access denied Help :(

Postby mikelly321 » 02. December 2012 09:06

try "xampp" as user name...
mikelly321
 
Posts: 4
Joined: 02. December 2012 09:01
Operating System: Mac


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 16 guests