Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : #1045 - Access denied


Poll
Poll Question : Do the Post has more elaboration to its issues
Good (0) (0%)
Bad (0) (0%)
True (0) (0%)
False (0) (0%)

Total Votes : 0


1


Threaded Mode | Print  

 #1045 - Access denied (18 Replies, Read 36525 times)
ant0n
Group: Member
Post Group: Newbie
Posts: 20
Status:
Ampps UI cannot access mySQL/db's via Ampps.

Full error message:
Quote
Error
MySQL said: Documentation

#1045 - Access denied for user 'root'@'localhost' (using password: YES)
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.


Attempting to access myPHPadmin throws this error. The password has not been changed. I am able to access all via 3rd party tool (Toad).

C:\Ampps\mysql\my.ini
Code
[client]
password    = mysql
IP: --   

#1045 - Access denied
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

To check if the password was changed, login from the command prompt (cmd):

Code
C:\Ampps\mysql\bin\mysql.exe -u root -pmysql


You should be able to get into mysql shell if the login was successful.

Also what is the content of the file C:\Ampps\ampps\data\my.conf ?




-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

#1045 - Access denied
ant0n
Group: Member
Post Group: Newbie
Posts: 20
Status:
Hi tidus, thanks for replying.

Quote From : tidus May 28, 2014, 6:27 am
Hi,

To check if the password was changed, login from the command prompt (cmd):

Code
C:\Ampps\mysql\bin\mysql.exe -u root -pmysql


You should be able to get into mysql shell if the login was successful.


Result:
Code
C:\Ampps\mysql\bin>mysql.exe -u root -pmysql
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


Quote
Also what is the content of the file C:\Ampps\ampps\data\my.conf ?

This file contains: "mysql"

On a side note, I'm also finding that Ampps reports an update is available, yet does nothing when choosing the option to proceed with the update. 

Choosing Help > About and clicking "Update Available" also does nothing.

Currently at version 2.3.


IP: --   

#1045 - Access denied
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

It seems your mysql root pass has been changed. Try keeping password blank:

Code
C:\Ampps\mysql\bin\mysql.exe -u root -p


Simply press enter when it asks for password.

Quote
I'm also finding that Ampps reports an update is available, yet does
nothing when choosing the option to proceed with the update. 




Close Ampps and start it again as Administrator. Right click -> Run as Administrator.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

#1045 - Access denied
ant0n
Group: Member
Post Group: Newbie
Posts: 20
Status:
:neu:   :-(   :squi:
Quote From : tidus May 29, 2014, 6:28 am

It seems your mysql root pass has been changed. Try keeping password blank:


This is a mystery, as I've never changed the password and I'm the only person to use this PC.

Quote

Code
C:\Ampps\mysql\bin\mysql.exe -u root -p


Simply press enter when it asks for password.


This provides access to the mysql terminal, but phpmyadmin still gives the 1045 error. :-/


Quote
I'm also finding that Ampps reports an update is available, yet does
nothing when choosing the option to proceed with the update. 

Quote

Close Ampps and start it again as Administrator. Right click -> Run as Administrator.


Run as administrator does nothing. This is the second update cycle that has failed for me.  2.3 required a complete wipe of the prior installation.

Is there anything that can correct these issues?


I add test domains and db, set up sites and never touch the configuration of Ampps. In know that AMPPS is more than I need, but it seems too 'fragile' (<-- not the right word) for the little I do with it.
IP: --   

#1045 - Access denied
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Since you can get into mysql terminal just by pressing enter means the password is blank. Ampps comes with default password as "mysql". So it has been changed, may be the third party tool might have changed it.

So to fix the issue, set the password as mysql:

Code
C:\Ampps\mysql\bin\mysqladmin.exe -u root password mysql


If you are changing it to anything else other than "mysql", then change the contents of the file C:\Ampps\ampps\data\my.conf with the same password.

Did you start Amupdate.exe as Administrator or Ampps.exe ?

Quote From : ant0n May 30, 2014, 3:50 am
:neu:   :-(   :squi:
Quote From : tidus May 29, 2014, 6:28 am

It seems your mysql root pass has been changed. Try keeping password blank:


This is a mystery, as I've never changed the password and I'm the only person to use this PC.

Quote

Code
C:\Ampps\mysql\bin\mysql.exe -u root -p


Simply press enter when it asks for password.


This provides access to the mysql terminal, but phpmyadmin still gives the 1045 error. :-/


Quote
I'm also finding that Ampps reports an update is available, yet does
nothing when choosing the option to proceed with the update. 

Quote

Close Ampps and start it again as Administrator. Right click -> Run as Administrator.


Run as administrator does nothing. This is the second update cycle that has failed for me.  2.3 required a complete wipe of the prior installation.

Is there anything that can correct these issues?


I add test domains and db, set up sites and never touch the configuration of Ampps. In know that AMPPS is more than I need, but it seems too 'fragile' (<-- not the right word) for the little I do with it.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

#1045 - Access denied
ant0n
Group: Member
Post Group: Newbie
Posts: 20
Status:
Quote From : tidus May 30, 2014, 6:56 am

Since you can get into mysql terminal just by pressing enter means the password is blank. Ampps comes with default password as "mysql". So it has been changed, may be the third party tool might have changed it.


The 3rd party app was installed after the password fail and accessed mysql without entering a password. The password has never been changed.

Quote

So to fix the issue, set the password as mysql:
Code
C:\Ampps\mysql\bin\mysqladmin.exe -u root password mysql

If you are changing it to anything else other than "mysql", then change the contents of the file C:\Ampps\ampps\data\my.conf with the same password.


To go back to the beginning: my.conf contains the original value "mysql".

Login fails using password 'mysql' but works with no password
Code

C:\Ampps\mysql\bin>mysql.exe -u root -pmysql
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

C:\Ampps\mysql\bin>mysql.exe -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.


Trying to set the password to 'mysql' fails:
Code

C:\Ampps\mysql\bin>mysqladmin.exe -u root password mysql
mysqladmin.exe: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'



Quote

Close Ampps and start it again as Administrator. Right click -> Run as Administrator.


As admin:
Code

Amupdate.exe - System Error
The program can't start because QtCored4.dll is missing from your computer. Try reinstalling the program to fix this problem.



Can't access myPHPadmin. Can't set password. Can't upgrade.  Dead end?
IP: --   

#1045 - Access denied
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Quote
C:\Ampps\mysql\bin>mysqladmin.exe -u root password mysql
mysqladmin.exe: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'


make sure your mysql server us running when you execute this command ?

Quote
Can't access myPHPadmin. Can't set password. Can't upgrade.  Dead end?


No. MySQL Server is working, just the password change is required.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

#1045 - Access denied
ant0n
Group: Member
Post Group: Newbie
Posts: 20
Status:
Quote From : tidus May 31, 2014, 11:47 am
Hi,

Quote
C:\Ampps\mysql\bin>mysqladmin.exe -u root password mysql
mysqladmin.exe: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'


make sure your mysql server us running when you execute this command ?


Board Image
IP: --   

#1045 - Access denied
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Can you provide us the TeamViewer access, we will look into this issue.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

#1045 - Access denied
ant0n
Group: Member
Post Group: Newbie
Posts: 20
Status:
Quote From : tidus June 2, 2014, 10:25 am
Hi,

Can you provide us the TeamViewer access, we will look into this issue.


Surely there's another method other than turning over control of my PC and web development installations.
IP: --   

#1045 - Access denied
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Okay. Run the following commands.

Code
$ mysql.exe -u root -p
mysql> use mysql;
mysql> update user set password=PASSWORD("mysql") where User='root';
mysql> flush privileges;
mysql> quit


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

#1045 - Access denied
ant0n
Group: Member
Post Group: Newbie
Posts: 20
Status:
:neu:

Code
C:\Ampps\mysql\bin>mysql.exe -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.16 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql;
Database changed
mysql> update user set password=PASSWORD("mysql") where User='root';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 3  Changed: 2  Warnings: 0

mysql> flush privileges
    -> quit


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


? mysql logfile for the past week
IP: --   

#1045 - Access denied
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Instead of:
Code
mysql> flush privileges

    -> quit


do the following, notice the semicolon, well it shouldn't matter now as you may have restarted your mysql server many times already.
Code

mysql> flush privileges;

mysql> quit


Also press Ctrl + F5 on browser while accessing phpMyAdmin. Its cache issue sometime in phpMyAdmin.




-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

#1045 - Access denied
ant0n
Group: Member
Post Group: Newbie
Posts: 20
Status:
Quote From : tidus June 4, 2014, 6:55 am

do the following, notice the semicolon,


I hate it when I do that. :-/

; == success

I think we're done here!

Going to exercise it a bit then try the upgrade.

Thank you Tidus.


IP: --   

#1045 - Access denied
fimaruf
Group: Member
Post Group: Newbie
Posts: 1
Status:
I am having the same problem on Mac OS Sierra. Nothing is working after several tries. Any help ?
IP: --   

#1045 - Access denied
Rishi_P
Group: Member
Post Group: Elite Member
Posts: 317
Status:
Hi,

Please open a support ticket here:
https://www.softaculous.com/support/
IP: --   

#1045 - Access denied Hope MySQL password is patch
W4CO
Group: Member
Post Group: Newbie
Posts: 8
Status:

W4C Technical Support Team
Using AMPPS 3.8 32 bit | Win10 64bit Installed at E;/ampps with PHP 7.x | MySQL 5.6 | Port 3306

Note :: AMPPS softculous installation were for 'https://' (SSL) and not 'http://' which worked for many project for almost a months. But all of a sudden hope the third party software had overridden the mysql password (don't know which project). But the changes were made to root config which were not changed in the PHPmyadmin and 'my.conf'. We have verified the configuration --> 3.8  has mutliple directories correpsondeing to pre and post installation for which softaculous should have done some exraordinary depiction to avoid conflict of config for pre installation and post installation.

Worked almost a six month without any issue with new install and worked fine.

A week ago, started with all config, but dead with PHPmyadmin Connect to mysql with the password 'mysql' default.
Tried changing password - did not work
Use flushing privileges + failed a/w taskkill
innodb force recovery (adding and removing)
and all other steps as in this forum but failed.

Indeed 'mysql' in the my.conf is no accepted by server. Could be some issue with 'patch' or 'cache' but even using cluster of unused browsers connected to loclhost perfectly but failed to connect mysql server.

This is the major issue with no permanent fix.

Upgrading to AMPPS 3.9 had failed various project in the past, thus no further chane been taken for upgrade. Satisifed with 3.8

Used MySQL workbench and finally end just before last mile to connect mysql@localhost:3306, but again failed for password. Neither "blank", nor "mysql" nor any other tehnciquie seems to work. Just sake thought that 'mysql' from PHPmycinfig / mysql using password 'mysql' although working but failed.

Have kind to this issue and justify.
IP: --   

#1045 - Access denied
nnasco3k
Group: Member
Post Group: Newbie
Posts: 2
Status:
Sorry about the inconvenient.
The best way to have AMPPS access denied fix is manually.
Follow the steps and measure things are in place accordingly.

1. Download and install AMPPS.

2. Once installed, open the AMPPS on desktop. If the MySQL button didn't run,

3. Click on MySQL SETTINGS and then, click on CONFIGURATION to open on notepad.

4. Stroll down a little bit and sure PASSWORD, PORT are set to:
(a) password = mysql
(b) port = 3306 (for MySQL button to run, change 3306 to any 4 digit port number of your choice. and wherever you see 3306 should be equally be change to same number of your choice along the settings path when through down).

(C) socket = "{$path}/mysql/mysql.sock"

Please don't include a,b,c in brackets. This are my own of listing the steps for easy to follow. After change port number, save and close the notepad. After saving settings, close and  Restart AMPPS.

5. If MySQL button runs, click on HOME ???? at the top and when it open on the window address as localhost/ampps/
Click on PHPMYADMIN to try to access login section.
When the LOGIN section opens, if access denied or when you are trying to login failed (with username: root and default password: mysql).

6. Goto the root folder of your AMPPS where it's saved in C:\ drive. That's, C:\Ampps
and open the exact folders after it like this:
C:\Ampps\phymyadmin\config.inc.php

Right click and open config.inc.php on text editor and made changes to:

$cfg['servers'][$i]['port'] = 'insert your 4 digit number here';

Remove the 'insert your 4 digit  number here' . This are my own statement. My way of explaining it for easy to understand.
Example:
$cfg['servers'][$i]['port'] = '3390';
Replace it with number of your choice you first use in settings.

7.
$cfg['servers'][$i]['auth_type'] = 'cookie';

Config is changed to cookie. Save it.

8. Goto C:\Ampps\data\my.conf
Open my.conf on test editor and make sure the default password is : mysql

Save it.

9. Goto C:\Ampps\phpMyAdmin\config.sample.inc.php
Click and open config.sample.inc.php on test editor.
$cfg['servers'][$i]['auth_type'] = 'cookie';
????
Make it's set to cookie. Save it.

10. $cfg['servers'][$i]['AllowNoPassword'] = false;
????
It's your choice to decide.
If you want to allow the use of password, set it to:  $cfg['servers'][$i]['AllowNoPassword'] = false;

If you don't want to allow the use of password, set it to:  $cfg['servers'][$i]['AllowNoPassword'] = true;

Save your settings and close it.
After all the steps are followed, restart your AMPPS.
Click on HOME ???? and click on phyMyAdmin to either login with your default username: root and default password: mysql depending on what you choose in [AllowNoPassword] = TRUE or FALSE to have access to  phpMyAdmin index.
Thanks.
IP: --   

« Previous    Next »

Threaded Mode | Print  

1


Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 28, 2024, 10:44 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 12  |  Page Created In:0.046