A
A
Andrey2021-02-02 15:48:32
PHP
Andrey, 2021-02-02 15:48:32

Can't connect to sql database (mariadb) from postfixadmin?

I know that the topic is fiercely hackneyed and the answer in Google is hundreds, but it does not help.

at the verification stage, postfixadmin gives an error about not being able to connect to the database

Error: Can't connect to database
Please edit the $CONF['database_*'] parameters in config.local.php.
DEBUG INFORMATION:
Connect: Access denied for user 'postfix'@'localhost' (using password: YES)


screen
spoiler
601949b16d835712233872.jpeg

a piece of the config.local.php config that is responsible for connecting to the database
// Database Config
// mysql = MySQL 3.23 and 4.0, 4.1 or 5
// mysqli = MySQL 4.1+ or MariaDB
// pgsql = PostgreSQL
// sqlite = SQLite 3
$CONF['database_type'] = 'mysqli';
$CONF['database_host'] = '127.0.0.1';
$CONF['database_user'] = 'postfix';
$CONF['database_password'] = '******';
$CONF['database_name'] = 'postfix';


I tried to specify different values ​​in
$CONF['database_host'] = 'localhost';

the postfix user and the base is present in mariadb, all rights are given, and I can go under it.
there is nothing interesting in the logs from mariadb.......
where am I wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Chernykh, 2021-02-02
@sashkets

in which line to do
mysql -u postfix -p -h 127.0.0.1
what outputs ??
and
netstat -anl | grep 3306

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question