# v6.0 MariaDB Default Credentials

**URL:** https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906
**Category:** Troubleshooting
**Created:** [2 February 2018 05:25 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906 "2018-02-02T05:25:42Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![IamUSER](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/i/5f9b8f/32.png) [@IamUSER](https://dietpi.com/forum/u/IamUSER)
#### Post date: [2 February 2018 05:25 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906/1 "2018-02-02T05:25:42Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![IamUSER](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/i/5f9b8f/32.png) [@IamUSER](https://dietpi.com/forum/u/IamUSER)
#### Post date: [2 February 2018 05:28 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906/2 "2018-02-02T05:28:25Z")

</div>

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](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.

---

<div class="post-metadata">

### Author: ![IamUSER](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/i/5f9b8f/32.png) [@IamUSER](https://dietpi.com/forum/u/IamUSER)
#### Post date: [2 February 2018 05:42 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906/3 "2018-02-02T05:42:56Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![johnvick](https://dietpi.com/forum/user_avatar/dietpi.com/johnvick/32/16_2.png) [@johnvick](https://dietpi.com/forum/u/johnvick)
#### Post date: [2 February 2018 06:26 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906/4 "2018-02-02T06:26:09Z")

</div>

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/](http://www.unrelatedshit.com/2016/05/06/phpmyadmin-root-login-vs-mariadb/)

John

---

<div class="post-metadata">

### Author: ![IamUSER](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/i/5f9b8f/32.png) [@IamUSER](https://dietpi.com/forum/u/IamUSER)
#### Post date: [3 February 2018 00:57 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906/5 "2018-02-03T00:57:17Z")

</div>

> [@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:
> 
> [phpMyAdmin root login vs. MariaDB](http://www.unrelatedshit.com/2016/05/06/phpmyadmin-root-login-vs-mariadb/)
> 
> John

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

---

<div class="post-metadata">

### Author: ![IamUSER](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/i/5f9b8f/32.png) [@IamUSER](https://dietpi.com/forum/u/IamUSER)
#### Post date: [3 February 2018 08:01 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906/6 "2018-02-03T08:01:25Z")

</div>

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/](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/](http://www.daniloaz.com/en/how-to-create-a-user-in-mysql-mariadb-and-grant-permissions-on-a-specific-database/)

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [3 February 2018 18:44 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906/7 "2018-02-03T18:44:06Z")

</div>

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

```nohighlight
 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](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.

---

<div class="post-metadata">

### Author: ![IamUSER](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/i/5f9b8f/32.png) [@IamUSER](https://dietpi.com/forum/u/IamUSER)
#### Post date: [4 February 2018 07:06 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906/8 "2018-02-04T07:06:06Z")

</div>

> [@MichaIng](#):
>
> - Fixed for v6.2: [https://github.com/Fourdee/DietPi/pull/1460](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!

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [4 February 2018 15:02 UTC](https://dietpi.com/forum/t/v6-0-mariadb-default-credentials/1906/9 "2018-02-04T15:02:39Z")

</div>

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