Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to install phpMyAdmin in Debian 12

258 views
Skip to first unread message

Petros Pap

unread,
Sep 26, 2023, 7:20:06 AM9/26/23
to
Hi there
I try to install phpMyAdmin but i got error



dbconfig-common: phpmyadmin configure: trying again.
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO).
unable to connect to mysql server.
error encountered creating user:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
dbconfig-common: phpmyadmin configure: aborted.
dbconfig-common: flushing administrative password
dpkg: error processing package phpmyadmin (--configure):
 installed phpmyadmin package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
phpmyadmin

Note: I have already setup password for root in mysql
mysql -uroot -p
working

status
--------------
mysql  Ver 15.1 Distrib 10.11.3-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper

Connection id:          6693
Current database:
Current user:           root@localhost
SSL:                    Cipher in use is TLS_AES_256_GCM_SHA384
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server:                 MariaDB
Server version:         10.11.3-MariaDB-1 Debian 12
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /run/mysqld/mysqld.sock
Uptime:                 2 hours 36 min 58 sec

Threads: 1  Questions: 13358  Slow queries: 0  Opens: 119  Open tables: 112  Queries per second avg: 1.418

How do I solve this issue?
Resetting password for root?

--
ppetros

Andy Smith

unread,
Sep 26, 2023, 7:50:07 AM9/26/23
to
Hi,

On Tue, Sep 26, 2023 at 01:56:44PM +0300, Petros Pap wrote:
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> password: NO)

^ scripts trying to connect to MariaDB as root with no password.

> Note: I have already setup password for root in mysql
> mysql -uroot -p
> working

Doesn't matter; that's not what the scripts are doing.

You need to arrange it so that:

# mysql -u root

works (no -p)

Normally MariaDB uses socket authentication for root@localhost, i.e.
if you're root you can log in as root@localhost through unix socket
without specifying password.

> How do I solve this issue?
> Resetting password for root?

I think you might need to remove your password for root@localhost
and return it back to socket authentication.

If you want to allow both kinds of authentication, that is possible
since Mariadb 10.4:

MariaDB> ALTER `root`@`localhost`
IDENTIFIED VIA unix_socket
OR mysql_native_password USING PASSWORD("letmein1")

But I think for the sake of Debian package scripts, root needs to
have socket authentication available.

Cheers,
Andy

--
https://bitfolk.com/ -- No-nonsense VPS hosting
0 new messages