v6.0 MariaDB Default Credentials

I just upgraded to the latest version of DietPi yesterday and the default credentials for MariaDB via PhpMyAdmin don’t seem to be working. According to the software list the login should be:

MySql / MariaDB Details:
username = root
password = dietpi

Can anyone tell me if I’m missing something? I also tried a SQL command line update of the root password and it allowed me to use command line. But I still am unable to access the instance via PhpMyAdmin. This was working perfectly on version 159 and I didn’t need to do anything additional. I appreciate the look.

Additionally Dietpi-Software seems to have no issue installing apps such as Pydio. And the default cred for those apps seems to work appropriately. I also tried the most recent info on phpmyadmin as follows:

Access phpmyadmin:
url = http://192.168.0.100/phpmyadmin

  • username = phpmyadmin (Previous to DietPi v6.0 = root)
  • password = The same as your root login password. Default is dietpi

This gave me access to the phpmyadmin DB only and did not allow user control.

I can open a ticket I just hoping I’m messing something up.

I am attempting another fresh install and will try to do a root logon from the default subnet of 192.168.0.x as shown in the default settings from the above forum post. Will update.

Update: Definitely on version 161 now. May have been before, installed less than 24hrs ago.

Try creating a new user with root privileges and logging into phpmyadmin with this user, and not root.

If I remember correctly this is a limitation of MariaDB i.e. root login not allowed, not DietPi.

Just found this:

http://www.unrelatedshit.com/2016/05/06/phpmyadmin-root-login-vs-mariadb/

John

Very good tip! I should know more in a few hours.

So you were onto it. It was a security limitation. There are no users with server wide permissions by default. The following posts helped me. Really no different than MySQL but a little security change makes setup, longer… :ugeek:

https://mariadb.com/kb/en/library/configuring-mariadb-for-remote-client-access/
http://www.daniloaz.com/en/how-to-create-a-user-in-mysql-mariadb-and-grant-permissions-on-a-specific-database/

  • Since Stretch, MariaDB comes with unix_socket authentication plugin for root user by default.
  • This means unix root can log into MariaDB root without password, but on the other hand no other user can do this, not even via sudo.
  • Thus all web ui software (using www-data) needs it’s own database user.
  • I just verified the missing privileges for phpMyAdmin on fresh installation. A newly added services stop (including mysql) prevents database access to grant full privileges to ‘phpmyadmin’:
 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Configuring phpMyAdmin: optional mysql admin tools

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")

That’s a very clean way of correcting the issue. Just did a fresh install and this worked perfectly. Thank you!

Thx for nice feedback, good to know, I don’t missed something :slight_smile:.