Page 1 of 1

[SOLVED] Access Denied phpMyAdmin

Posted: Fri May 26, 2017 4:07 pm
by limitunknown.com
Ubuntu 16.04 at Digital Ocrean
Latest VestaCP

https://new.siteviewer.us/phpmyadmin/

Try to log in with username and password after creating database in vesta.

Code: Select all

 #1045 - Access denied for user 'testu'@'localhost' (using password: YES)
[/b]
This also happens when i create new users as well.


This is a new vesta installation and the only things i've done are.

Code: Select all

# Running fixes for phpmyadmin
curl -O -k https://raw.githubusercontent.com/skurudo/phpmyadmin-fixer/master/pma.sh && chmod +x pma.sh && ./pma.sh
Installed configured and activated vesta-lets-encrypt

Re: Access Denied phpMyAdmin

Posted: Sun May 28, 2017 12:42 am
by limitunknown.com
I'm not sure exactly what it was but i found two things.

I have a installer script for ubuntu that sets up my preferred configurations.
I started from scratch installing vesta first and ran that after installing vesta.

Also the password for the user i was creating had a single quote

Code: Select all

'
in it.

Apparently when creating passwords that have single quotes, they aren't escaped.
Doubling single quotes allows you to escape and use them.

Code: Select all

my''pass_109
would let you log in with

Code: Select all

my'pass_109

Re: [SOLVED] Access Denied phpMyAdmin

Posted: Fri Feb 21, 2020 6:31 am
by caustino
I solved it in this simple way
***** restore user root mysql *****
mysql -u root -p mysql
MariaDB [mysql]> update user set plugin='' where user='root';
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> exit
***********************************

to disable user root again ....
update user set plugin='unix_socket' where user='root';