phpmyadmin cannot log into MariaDB
I have just installed apache2, php7, and mariadb on a new ubuntu 20 install. I had a problem getting phpmyadmin to come up but fixed it with an older answer from ask ubuntu. But now I cannot log into my mariadb from phpmyadmin. I can log in by just sudo mysql on the terminal with the only password requested being my sudo password. I am thinking that the issue is what I found in the mariadb documentation below but I have no idea how to fix it. Somehow it seems I need to change the security back to passwords but I don't follow how to do it: "MariaDB starting with 10.4.3 In MariaDB 10.4.3 and later, the unix_socket authentication plugin is installed by default, and it is used by the 'root'@'localhost' user account by default. See Authentication from MariaDB 10.4 for more information.
The unix_socket authentication plugin allows the user to use operating system credentials when connecting to MariaDB via the local Unix socket file. This Unix socket file is defined by the socket system variable.
The unix_socket authentication plugin works by calling the getsockopt system call with the SO_PEERCRED socket option, which allows it to retrieve the uid of the process that is connected to the socket. It is then able to get the user name associated with that uid. Once it has the user name, it will authenticate the connecting user as the MariaDB account that has the same user name.
The unix_socket authentication plugin is not suited to multiple Unix users accessing a single MariaDB user account. " I have tried: <Directory "/var/www/html"> AllowOverride All and Include /etc/phpmyadmin/apache.conf
61 Answer
You cannot use root with phpMyAdmin. You will need to create a separate account in the database with all privileges, and use that for phpMyAdmin. – Matigo 2 days ago I followed the procedure from the tutorial at to setup a new user and everything works good now as Matigo suggested.