Welcome Guest. Please Login or Register  


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

1


Threaded Mode | Print  

 #1045 - Access denied (16 Replies, Read 18299 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: 1123
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: 1123
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: 1123
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: 1123
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: 1123
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: 1123
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: 1123
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: --   

« Previous    Next »

Threaded Mode | Print  

1


Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is October 19, 2017, 2:50 pm.

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