Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] MariaDB Official

Featured Replies

5 hours ago, mgutt said:

A little feedback on that: This is not a place to help users of other containers like the one of Linuxserver and users using the command line to create multiple databases are additional special scenarios I'm not really willed to help only because some YouTubers are spreading bad How-Tos

 

This is not recommend. Create dumps from each database. You can use phpmyadmin, HeidiSQL (Windows), Adminer, Command Line ...

Thanks. Totally understand only supporting this version here. And I think that is what got me into trouble in the first place. A Youtube video I followed.

 

I cannot log into the db to do the dump because of the "can't connect to local server through socket" issue. I will:

  • look for a way to address that first on the linuxserver support first
  • do a dump
  • switch over to the official version
  • use separate Mariadb dockers for each db
  • 4 weeks later...
  • Replies 256
  • Views 108.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • chmod of this file needs to be 644, i created it with nano and it wasn't so mariadb ignored it.   chmod 644 /mnt/user/appdata/mariadb-official/config/nextcloud.cnf  

  • I just updated to the version 11.3.2 which was released 7h ago, since then mariadb is broken. I had to roll back to a backup from tonight and go back to version mariadb:11.2.3.   Anyone else

  • Set Root Password   If you like to manually set your root password remove the word "yes" from "Generate Random Password":   Then set your password through "Show more settings

Posted Images

I'm trying to restore a database backup in the Unraid terminal using the command shown in the support section:

 

docker exec -i MariaDB-Official sh -c 'exec mysql -uroot -p"YOUR_ROOT_PASSWORD"' < /mnt/user/Backups/all-databases.sql

 

However I'm getting the following error:

 

sh: 1: exec: mysql: not found

 

Any idea how to fix this and get the database imported? Thank you.

  • Author
1 hour ago, thunderclap said:

Any idea how to fix this

Maybe using the command mariadb and not mysql?

15 hours ago, mgutt said:

Maybe using the command mariadb and not mysql?

Well I feel stupid, though in my defense the official container info was wrong so I don't feel quite as stupid. Thanks.

Ok so I did a export of a db of mine called bookstackapp. I exported it as databases.sql

 

Then I made some changes to the db by removing data.

 

My export is at mnt/cache/appdata/backup/databases.sql

 

Now I want to restore this test db but the commands don't seem to be working.

 

If I run the following

docker exec -t MariaDB-Official sh -c `exec mariadb -uroot -ppassword` bookstackapp  < /mnt/cache/appdata/backup/databases.sql

 

 I get
bash: exec: mariadb: not found
sh: 1: bookstackapp: not found

 

 

 

  • Author

Use regular single quotes.

Ok starting over from scratch but I can't seem to reset my password.

added to post arguments: mysqld_safe --skip-grant-tables

 

Log says this.

/usr/local/bin/docker-entrypoint.sh: line 617: exec: mysqld_safe: not found

 

 

  • 5 weeks later...
On 8/29/2023 at 5:25 PM, chip said:

Ok starting over from scratch but I can't seem to reset my password.

added to post arguments: mysqld_safe --skip-grant-tables

 

Log says this.

/usr/local/bin/docker-entrypoint.sh: line 617: exec: mysqld_safe: not found

 

 

Same problem here trying to reset root password, any help?

Hi

I've been running my unraid server with mariadb & nextcloud for the past 6 months. I had no issues. For the past week the mariadb-official container has been stopping radomly and now it totally doesnt want to start. I have been looking everywhere for a solution and i think it has to do with corrupted tables that needs repairing. When I checked the logs this is what i find: can anyone help me repair this step by step as my knowledge of linux is zero :(

mariadb.jpg

  • 1 month later...
On 8/21/2023 at 5:25 PM, mgutt said:

Maybe using the command mariadb and not mysql?

 

On 8/22/2023 at 9:17 AM, thunderclap said:

Well I feel stupid, though in my defense the official container info was wrong so I don't feel quite as stupid. Thanks.

 

I just wanted to bring up that the official MariaDB docker container still has this incorrect information so I can see it being confusing for people (including myself).

 

image.thumb.png.fdb46fb42c186a5f35680b5eded6aba5.png

 

image.png.ebb2a6d067228177f3b68ecd2b972262.png

I found the correct information at https://mariadb.com/kb/en/mysqldump/ 

Edited by Subrosian

On 6/10/2021 at 2:33 AM, mgutt said:

Overview: Support for MariaDB Official docker container

Docker: https://hub.docker.com/_/mariadb

Github: https://github.com/MariaDB/mariadb-docker

 

This is the official MariaDB container which sets by default a secure random root password and the user is able to set the database name, user and password through the container's settings, which allows an easy installation.

 

Donate? 🤗

 

 

Nextcloud Example

image.png.1f867409eab569321168331b51ca1dbc.png

 

Note: You find the random root password ONLY after the first boot in the container's logs:

915628134_2021-06-1009_25_22.png.0177e24cf309e5aec68fd5c50a58c5d3.png


Connect to MariaDB through Terminal

Execute the following and enter your root password:

docker exec -it MariaDB-Official mariadb -u root -p'your_root_password'

 

 

Hi -- having a problem that I can't get past.  (And I'll freely admit I'm new to both Unraid and MariaDB, so please bear with me.

After I create the container as shown, it apparently won't start.  It shows as "stopped" in the Docker tab of Unraid.  When I go into the terminal and run the docker exec command, I get the following:

 

root@Gretzky:~# docker exec -it MariaDB-Official nextcloud -u root -p********************
Error response from daemon: Container 4dc45333bf5dc460ad0d273f54f3d8d630c6d2853176b1934fa852ac717545a0 is not running


Am I missing something?  This seems pretty simple, but I'm apparently not getting something right.

Thank you for your help.

Brent

  • Author
5 hours ago, retroactive-tulip8645 said:
MariaDB-Official nextcloud

Your Container Name contains a whitespace?

 

5 hours ago, retroactive-tulip8645 said:
is not running

You can't connect to a container, which is not running.

 

5 hours ago, retroactive-tulip8645 said:

It shows as "stopped" in the Docker tab of Unraid

Container logs? Visible through container icon > menu.

 

No, the container name is MariaDB-Official, the db name is nextcloud.  (That's the command specified in the first post of the thread, with mariadb substituted with nextcloud.)

 

6 hours ago, retroactive-tulip8645 said:

Connect to MariaDB through Terminal

Execute the following and enter your root password:

docker exec -it MariaDB-Official mariadb -u root -p'your_root_password'


Yes, It's not running.  Trying to figure out why.

Here is what I have for the log file:
 

/usr/local/bin/docker-entrypoint.sh: line 617: exec: mysqld_safe: not found
/usr/local/bin/docker-entrypoint.sh: line 617: exec: mysqld_safe: not found

** Press ANY KEY to close this window ** 


I've deleted the container and restarted a few times with the same result each time.

 

 

  • Author
1 minute ago, retroactive-tulip8645 said:
mysqld_safe

Did you add this to your container settings?

mysqld_safe --skip-grant-tables

 

If yes: Why didn't you mention it?

 

It seems I need to update my posts and the container description as MariaDB changed many command names...

 

2 minutes ago, retroactive-tulip8645 said:

the db name is nextcloud.

The db name is not part of the command.

 

4 minutes ago, mgutt said:

Did you add this to your container settings?

mysqld_safe --skip-grant-tables

 

If yes: Why didn't you mention it?


No.  I wouldn' tknow where to add it.

Bah, I just noticed the advanced settings switch, and sure enough, there was mysqld_safe --skip-grant-tables in the Post arguments.  I'm sorry.  Edited the container, still failed, here is the log:

 

2023-11-06  2:35:47 0 [Warning] Can't create test file /var/lib/mysql/599ca10ebea3.lower-test
2023-11-06  2:35:47 0 [ERROR] mariadbd: Can't create/write to file './ddl_recovery.log' (Errcode: 13 "Permission denied")
2023-11-06  2:35:47 0 [ERROR] DDL_LOG: Failed to create ddl log file: ./ddl_recovery.log
2023-11-06  2:35:47 0 [ERROR] Aborting
2023-11-06 02:35:47-06:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.1.2+maria~ubu2204 started.
2023-11-06 02:35:47-06:00 [Note] [Entrypoint]: Initializing database files

Installation of system tables failed!  Examine the logs in
/var/lib/mysql/ for more information.

The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:

    shell> /usr/bin/mariadb-install-db --defaults-file=~/.my.cnf

You can also try to start the mariadbd daemon with:

    shell> /usr/sbin/mariadbd --skip-grant-tables --general-log &

and use the command line tool /usr/bin/mariadb
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mariadb -u root mysql
    MariaDB> show tables;

Try '/usr/sbin/mariadbd --help' if you have problems with paths.  Using
--general-log gives you a log in /var/lib/mysql/ that may be helpful.

The latest information about mariadb-install-db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss

Please check all of the above before submitting a bug report
at https://mariadb.org/jira


** Press ANY KEY to close this window ** 

 

These are the settings I used to create the MariaDB container:

Screenshot 2023-11-06 080038.png

On 6/10/2021 at 3:33 AM, mgutt said:

Set Root Password

 

If you like to manually set your root password remove the word "yes" from "Generate Random Password":

486128505_2021-06-1009_29_40.png.9c58d3d590958a9bb1e8d2c98bbd8e89.png

 

Then set your password through "Show more settings":

1244929783_2021-06-1009_31_35.png.c266779b45e41370a4706a7040f4b3c0.png

 

Note: This does not allow to change the password.

 

Reset Root Password

 

Edit the container, enable advanced view and add "mysqld_safe --skip-grant-tables" to the Post Arguments and start the container:

image.png.4929680835ad9e868e6013cfd16689b7.png

 

Open the cotnainer's console and execute the following commands:

mariadb -u root

 

Now you are connected to MariaDB. Execute this:

FLUSH PRIVILEGES;

 

And finally this:

SET PASSWORD FOR root@'localhost' = PASSWORD('your_new_password');

 

575706191_2021-07-1423_21_07.png.82fc27fe2ceebec2cc4fe0e73898f295.png

 

Finally edit the container and remove the "mysqld_safe --skip-grant-tables" part again.

 

 

 

I wanted to say that now you need to replace mysqld_safe with mariadbd-safe for this to work. also to perform a dump you need to replace mysqldump with mariadb-dump. Also to note is that setting a password with a lot of special characters like this: (not used anymore so i dont care to share it) e>p#=#+R<cub?F&gp=Hb[4$mz  caused problems. 

hello,

 

I tried to download the latest image... but I get this error:

 

Unable to find image 'seafile-mariadb:latest' locally
docker: Error response from daemon: pull access denied for seafile-mariadb, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

 

other downloads and images are working correctly...

 

where is my mistake?

 

TB

1 hour ago, donbruno said:

hello,

 

I tried to download the latest image... but I get this error:

 

Unable to find image 'seafile-mariadb:latest' locally
docker: Error response from daemon: pull access denied for seafile-mariadb, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

 

other downloads and images are working correctly...

 

where is my mistake?

 

TB

mmmh I  know my mistake... sorry

  • 1 month later...

I am in a bit of a pickle here.  I originally installed MariaDB-Official to manage my nextcloud database online.  Now I'd like to branch out to different dockers which require databases which I'd like to manage through one Maria-DB docker container (I plan to use adminer to help manage this).  That being said, I forgot the or dont recall the root password.  Here is my MariaDB setup:

 

image.png.31c4f9f523f358df989a5af7ba2a6f43.png

 

I have seen a lot of stuff out there on how to reset the root password by going to Safe Mode, and the --chart tables post arguments but that doesn't seem to be working.  Is there a way I can reinstall the MariaDB docker (to reset the random root password) without losing my Nextcloud database?  Any advice on how to correct?

 

Thanks!

On 6/10/2021 at 9:33 AM, mgutt said:

Set Root Password

 

If you like to manually set your root password remove the word "yes" from "Generate Random Password":

486128505_2021-06-1009_29_40.png.9c58d3d590958a9bb1e8d2c98bbd8e89.png

 

Then set your password through "Show more settings":

1244929783_2021-06-1009_31_35.png.c266779b45e41370a4706a7040f4b3c0.png

 

Note: This does not allow to change the password.

 

Reset Root Password

 

Edit the container, enable advanced view and add "mysqld_safe --skip-grant-tables" to the Post Arguments and start the container:

image.png.4929680835ad9e868e6013cfd16689b7.png

 

Open the cotnainer's console and execute the following commands:

mariadb -u root

 

Now you are connected to MariaDB. Execute this:

FLUSH PRIVILEGES;

 

And finally this:

SET PASSWORD FOR root@'localhost' = PASSWORD('your_new_password');

 

575706191_2021-07-1423_21_07.png.82fc27fe2ceebec2cc4fe0e73898f295.png

 

Finally edit the container and remove the "mysqld_safe --skip-grant-tables" part again.

Many thanks for this helpful hint on resetting the root password. However, on my MariaDB version (11.2.2) adding the post argument "mysqld_safe --skip-grant-tables" resulted in the container no longer wanting to start. The following line was then found in the log file:
/usr/local/bin/docker-entrypoint.sh: line 658: exec: mysqld_safe: not found
I then discovered in the MariaDB documentation that something had changed in the symlinks for this command as of version 10.5.2. I therefore used the command "mariadbd-safe" instead of "mysqld_safe" and then everything worked perfectly. I'm not sure if this is the right solution, but at least it did the trick.

  • 4 weeks later...

After a recent update it would seem that I'm having trouble with "InnoDB."

 

Any thoughts on the following? So far I've tried downgrading all the way back to 10.11.3 and I still seem to get the same error.  I've tired a few things but still seems to be in a loop.

 

image.thumb.png.30512d4037e9b3d297036a11c2df4e87.png

Update, I ended up rebuilding everything from scratch.  I tried to recover in steps but I was unsuccessful. 

 

Seems that between the issues noted with the database then re-establishing the link to the database itself within the individuals applications there were too many lingering issues.

  • 2 weeks later...

So I noted that an update was ready. I stopped the docker, ran the update and now MariaDB won't start. When I look in the log file I see this:

 

2024-02-14  0:46:46 0 [Note] Starting MariaDB 11.2.3-MariaDB-1:11.2.3+maria~ubu2204 source revision 79580f4f96fc2547711f674eb8dd514abd312b4a as process 1
2024-02-14  0:46:46 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-02-14  0:46:46 0 [Note] InnoDB: Number of transaction pools: 1
2024-02-14  0:46:46 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-02-14  0:46:46 0 [Note] InnoDB: Using liburing
2024-02-14  0:46:46 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-02-14  0:46:46 0 [Note] InnoDB: Completed initialization of buffer pool
2024-02-14  0:46:46 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2024-02-14  0:46:46 0 [Note] InnoDB: End of log at LSN=37198
2024-02-14  0:46:46 0 [Note] InnoDB: Opened 3 undo tablespaces
2024-02-14  0:46:46 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
2024-02-14  0:46:46 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-02-14  0:46:46 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-02-14  0:46:46 0 [Note] InnoDB: log sequence number 37198; transaction id 4
2024-02-14  0:46:46 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2024-02-14  0:46:46 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-02-14  0:46:46 0 [Note] Plugin 'wsrep-provider' is disabled.
2024-02-14  0:46:46 0 [Note] InnoDB: Buffer pool(s) load completed at 240214  0:46:46
2024-02-14  0:46:46 0 [ERROR] Can't open and lock privilege tables: Can't find file: './mysql/servers.MAI' (errno: 2 "No such file or directory")
2024-02-14  0:46:46 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-02-14  0:46:46 0 [Note] Server socket created on IP: '::'.
2024-02-14  0:46:46 0 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/db.MAI' (errno: 2 "No such file or directory")
2024-02-14  0:46:46 0 [ERROR] Aborting
2024-02-14 00:46:45-06:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.2.3+maria~ubu2204 started.
2024-02-14 00:46:46-06:00 [Note] [Entrypoint]: MariaDB upgrade not required

 

I am not turning anything up by searching for servers.MAI or db.MAI. Any steps I've seen to try and run commands won't work because I can't get the container up and running. I'm kind of stuck here and would love any steps to try and fix this.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.