v6.0 MariaDB Default Credentials

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
IamUSER
Posts: 7
Joined: Fri Feb 02, 2018 6:21 am

v6.0 MariaDB Default Credentials

Post by IamUSER »

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.
Last edited by IamUSER on Fri Feb 02, 2018 6:29 am, edited 1 time in total.
IamUSER
Posts: 7
Joined: Fri Feb 02, 2018 6:21 am

Re: v160 MariaDB Default Credentials

Post by IamUSER »

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.
IamUSER
Posts: 7
Joined: Fri Feb 02, 2018 6:21 am

Re: v160 MariaDB Default Credentials

Post by IamUSER »

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.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: v160 MariaDB Default Credentials

Post by johnvick »

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 ... s-mariadb/

John
IamUSER
Posts: 7
Joined: Fri Feb 02, 2018 6:21 am

Re: v160 MariaDB Default Credentials

Post by IamUSER »

johnvick wrote: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 ... s-mariadb/

John
Very good tip! I should know more in a few hours.
IamUSER
Posts: 7
Joined: Fri Feb 02, 2018 6:21 am

Re: v160 MariaDB Default Credentials

Post by IamUSER »

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/confi ... nt-access/
http://www.daniloaz.com/en/how-to-creat ... -database/
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: v160 MariaDB Default Credentials

Post by MichaIng »

- 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':

Code: Select all

 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")
- Fixed for v6.2: https://github.com/Fourdee/DietPi/pull/1460
- To fix now, run mysql -e "grant all privileges on *.* to phpmyadmin@localhost with grant option" within terminal, logged in as root user.
IamUSER
Posts: 7
Joined: Fri Feb 02, 2018 6:21 am

Re: v160 MariaDB Default Credentials

Post by IamUSER »

MichaIng wrote: - Fixed for v6.2: https://github.com/Fourdee/DietPi/pull/1460
- To fix now, run mysql -e "grant all privileges on *.* to phpmyadmin@localhost with grant option" within terminal, logged in as root user.
That's a very clean way of correcting the issue. Just did a fresh install and this worked perfectly. Thank you!
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: v6.0 MariaDB Default Credentials

Post by MichaIng »

Thx for nice feedback, good to know, I don't missed something :).
Post Reply