This procedure temporarily starts the MariaDB Docker container with authentication disabled, resets the root password through the container console, and then restores the normal container configuration.
Warning: Back up the MariaDB appdata/database directory before proceeding. While
--skip-grant-tablesis enabled, MariaDB authentication is disabled.
- Open the Unraid Docker page.
- Click the MariaDB container icon and select Edit.
- Temporarily change any value.
- Change the value back to its original setting.
- The greyed-out Apply button should now become clickable.
- Click Apply.
- Copy and save the displayed
docker runcommand.
The copied command provides a backup of the current container settings, including paths, ports, environment variables, network settings, and additional parameters.
From the Unraid Docker page, stop the MariaDB container.
Click the MariaDB container icon and select Edit.
Enable Advanced View if the relevant fields are not visible.
Keep the Docker user option in Extra Parameters:
--user 99:100
This option appears before the image name in the generated Docker command.
On Unraid, the numeric user and group IDs map to:
- UID
99= usernobody - GID
100= groupusers
Therefore:
--user 99:100
is the numeric equivalent of:
--user nobody:users
Using numeric IDs avoids user and group name-resolution differences between the Unraid host and the container.
Add the following to Post Arguments:
--skip-grant-tables
--skip-networking
These arguments appear after the image name in the generated Docker command.
--skip-grant-tablestemporarily disables MariaDB account authentication.--skip-networkingprevents remote database connections while authentication is disabled.
Click Apply and allow the container to start.
- Open the Unraid Docker page.
- Click the MariaDB container icon.
- Select Console.
From the container console, connect to MariaDB:
mariadb -urootNo password should be required while MariaDB is running with --skip-grant-tables.
At the MariaDB prompt, reload the privilege tables:
FLUSH PRIVILEGES;List the available MariaDB accounts:
SELECT User, Host FROM mysql.user;Alternatively, display each account in user@host format:
SELECT CONCAT(User, '@', Host) AS Account
FROM mysql.user;Identify the exact root account that needs to be changed.
For example, reset the password for root@localhost:
SET PASSWORD FOR 'root'@'localhost' =
PASSWORD('NEW_STRONG_PASSWORD');For a root account using % as its host:
SET PASSWORD FOR 'root'@'%' =
PASSWORD('NEW_STRONG_PASSWORD');Replace NEW_STRONG_PASSWORD with the new password.
The username and host must exactly match an account returned by the earlier query. If multiple root accounts are used, reset each relevant account separately.
Confirm the account list again:
SELECT CONCAT(User, '@', Host) AS Account
FROM mysql.user;Exit MariaDB:
EXIT;Close the container console.
- Open the Unraid Docker page.
- Click the MariaDB container icon and select Edit.
- Remove the following values from Post Arguments:
--skip-grant-tables
--skip-networking
- Leave the following value in Extra Parameters:
--user 99:100
- Click Apply.
Unraid will automatically stop the existing container, apply the updated configuration, and start the container normally.
Important: Do not leave
--skip-grant-tablesenabled after completing the password reset.
Open the MariaDB container console and run:
mariadb -uroot -pEnter the new password when prompted.
If an application connects to MariaDB using the changed account, update the password in that application's configuration as well.