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] Linuxserver.io - MariaDB

Featured Replies

On 10/23/2020 at 6:43 AM, SPOautos said:

I am just trying to figure out how MariaDB works and have a question. Can you use the same MariaDB for multiple different apps? For instance I have MariaDB installed and my Nextcloud uses it. If I install Piwigo can it also use that same MariaDB?  Will it just create and manage multiple databases for different apps? Is there a point where it starts to get too slow when using multiple apps? My database for Nextcloud is around 160GB and when I install Piwigo it will also be around 150-200GB.  I'm sure the size isnt a issue, really just wanted to make sure that multiple apps can use the same MariaDB.

 

Thanks!

This is exactly what I am trying to do.

 

I have a working Nextcloud install, now I want to set up Piwigo as well.

 

For the Nextcloud, there were great step by step tutorials on Youtube and blog posts, but I can't find anything similar for Piwigo on Unraid.

 

Anyone able to sketch out the basic steps, or point me in the right direction? I have a basic idea but am muddling through right now.

  • Replies 623
  • Views 233.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • goosetrousers
    goosetrousers

    I did this, everything worked again. Then I updated to  linuxserver/mariadb:latest and everything continued to work, but with an Alpine base. Saved me from migrating, I guess I'll sit on my back

  • @exico here is my workaround,   try using this Repository: linuxserver/mariadb:110.4.21mariabionic-ls31

  • Update:   I re-installed the mariadb docker without password and then I managed to login with root account (no password) - then manually changed the password  mysql -u root -p mysql>

Posted Images

On 11/15/2020 at 9:58 AM, dbr1 said:

This is exactly what I am trying to do.

 

I have a working Nextcloud install, now I want to set up Piwigo as well.

 

For the Nextcloud, there were great step by step tutorials on Youtube and blog posts, but I can't find anything similar for Piwigo on Unraid.

 

Anyone able to sketch out the basic steps, or point me in the right direction? I have a basic idea but am muddling through right now.

 

I was told it's best to install multiple instances of MariaDB so that Nextcloud and Piwigo have thier own.  Due to work I've not yet got around to setting it all up so cant offer any help there.

solved

Edited by maxse

  • 5 weeks later...

I'm having issues with MariaDB, I've got a few dockers that require it's use which keep failing every few hours requiring MariaDB to be restarted.

 

Has anyone else experienced this? Can I back the databases and reinstall Maria?

  • 3 weeks later...

Hello All,

 

A bit of a noob so bear with me. My server had an abrupt restart, when I fired it back up I'm getting a loop in my MariaDB dockers logs:

 

2021-01-10T18:36:03.756651Z mysqld_safe Starting mysqld daemon with databases from /config/databases

2021-01-10T18:35:59.906132Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

 

I also found (with the help of these forums) the .err (eefb016d5e2e.err) file:

 

2021-01-10  9:58:24 0 [ERROR] Found 1 prepared transactions! It means that mysqld was not shut down properly last time and critical recovery information (last binlog or tc.log file) was manually deleted after a crash. You have to start mysqld with --tc-heuristic-recover switch to commit or rollback pending transactions.
2021-01-10  9:58:24 0 [ERROR] Aborting

 

After more digging I tried to issue the following:

 

mysqld --tc-heuristic-recover=ROLLBACK

 

and

 

mysqld --tc-heuristic-recover=COMMIT

 

No luck get the following error:

 

mysqld: Error on realpath() on '/var/lib/mysql-files' (Error 2 - No such file or directory)
2021-01-10T18:39:27.714646Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.
2021-01-10T18:39:27.714711Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.
2021-01-10T18:39:27.714732Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-01-10T18:39:27.714961Z 0 [ERROR] Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server. Supplied value : /var/lib/mysql-files
2021-01-10T18:39:27.714971Z 0 [ERROR] Aborting

 

Appreciate any and all guidance/help

 

Hello, I have MariaDB installed for Nextcloud however I would like to now install Wordpress which also uses the MariaDB.  How can I install a second docker of MariaDB?  (installing a second instance so I have a separate database for Nextcloud vs Wordpress would be the correct way to do this wouldnt it?

 

Thank You!

8 hours ago, SPOautos said:

Hello, I have MariaDB installed for Nextcloud however I would like to now install Wordpress which also uses the MariaDB.  How can I install a second docker of MariaDB?  (installing a second instance so I have a separate database for Nextcloud vs Wordpress would be the correct way to do this wouldnt it?

 

Thank You!

You can use the same container for both. Just create a new database for each instance that need it.

Hello, 
I have been recently running docker containers
ombi
mariadb
swag (as the rev proxy)
As of late when I trigger a cron job in ombi I am seeing this in the log that seems to relate to the mariadb instance

Error when attempting to create newsletter
System.Net.Sockets.SocketException (104): Connection reset by peer
at MySqlConnector.Protocol.Serialization.SocketByteHandler.DoReadBytesSync(Memory`1 buffer)
--- End of stack trace from previous location ---
at MySqlConnector.Protocol.Serialization.BufferedByteReader.ReadBytesAsync(IByteHandler byteHandler, ArraySegment`1 buffer, Int32 totalBytesToRead, IOBehavior ioBehavior)
at MySqlConnector.Protocol.Serialization.ProtocolUtility.ReadPacketAfterHeader(ReadOnlySpan`1 headerBytes, BufferedByteReader bufferedByteReader, IByteHandler byteHandler, Func`1 getNextSequenceNumber, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior)
at MySqlConnector.Protocol.Serialization.ProtocolUtility.ReadPacketAsync(BufferedByteReader bufferedByteReader, IByteHandler byteHandler, Func`1 getNextSequenceNumber, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior)
at MySqlConnector.Protocol.Serialization.ProtocolUtility.DoReadPayloadAsync(BufferedByteReader bufferedByteReader, IByteHandler byteHandler, Func`1 getNextSequenceNumber, ArraySegmentHolder`1 previousPayloads, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior)
at MySqlConnector.Protocol.Serialization.StandardPayloadHandler.ReadPayloadAsync(ArraySegmentHolder`1 cache, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior)
at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken)
--- End of stack trace from previous location ---
at MySqlConnector.Core.ServerSession.ReceiveReplyAsyncAwaited(ValueTask`1 task)
at MySqlConnector.Core.ResultSet.<ScanRowAsync>g__ScanRowAsyncAwaited|9_0(ResultSet this_, Task`1 payloadTask, Row row_, CancellationToken token)
at MySqlConnector.Core.ResultSet.ReadAsync(IOBehavior ioBehavior, CancellationToken cancellationToken)
at MySqlConnector.Core.ResultSet.Read()
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at Ombi.Schedule.Jobs.Ombi.NewsletterJob.FilterPlexEpisodes(IEnumerable`1 source, IQueryable`1 recentlyAdded)
at Ombi.Schedule.Jobs.Ombi.NewsletterJob.Start(NewsletterSettings settings, Boolean test)
[41m[30mfail[39m[22m[49m: Ombi.Controllers.V1.External.TesterController[1000]
Could not test Newsletter
System.Net.Sockets.SocketException (104): Connection reset by peer
at MySqlConnector.Protocol.Serialization.SocketByteHandler.DoReadBytesSync(Memory`1 buffer)
--- End of stack trace from previous location ---
at MySqlConnector.Protocol.Serialization.BufferedByteReader.ReadBytesAsync(IByteHandler byteHandler, ArraySegment`1 buffer, Int32 totalBytesToRead, IOBehavior ioBehavior)
at MySqlConnector.Protocol.Serialization.ProtocolUtility.ReadPacketAfterHeader(ReadOnlySpan`1 headerBytes, BufferedByteReader bufferedByteReader, IByteHandler byteHandler, Func`1 getNextSequenceNumber, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior)
at MySqlConnector.Protocol.Serialization.ProtocolUtility.ReadPacketAsync(BufferedByteReader bufferedByteReader, IByteHandler byteHandler, Func`1 getNextSequenceNumber, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior)
at MySqlConnector.Protocol.Serialization.ProtocolUtility.DoReadPayloadAsync(BufferedByteReader bufferedByteReader, IByteHandler byteHandler, Func`1 getNextSequenceNumber, ArraySegmentHolder`1 previousPayloads, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior)
at MySqlConnector.Protocol.Serialization.StandardPayloadHandler.ReadPayloadAsync(ArraySegmentHolder`1 cache, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior)
at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken)
--- End of stack trace from previous location ---
at MySqlConnector.Core.ServerSession.ReceiveReplyAsyncAwaited(ValueTask`1 task)
at MySqlConnector.Core.ResultSet.<ScanRowAsync>g__ScanRowAsyncAwaited|9_0(ResultSet this_, Task`1 payloadTask, Row row_, CancellationToken token)
at MySqlConnector.Core.ResultSet.ReadAsync(IOBehavior ioBehavior, CancellationToken cancellationToken)
at MySqlConnector.Core.ResultSet.Read()
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at Ombi.Schedule.Jobs.Ombi.NewsletterJob.FilterPlexEpisodes(IEnumerable`1 source, IQueryable`1 recentlyAdded)
at Ombi.Schedule.Jobs.Ombi.NewsletterJob.Start(NewsletterSettings settings, Boolean test)
at Ombi.Schedule.Jobs.Ombi.NewsletterJob.Start(NewsletterSettings settings, Boolean test)
at Ombi.Controllers.V1.External.TesterController.NewsletterTest(NewsletterNotificationViewModel settings)


I have been pulling my hair out to why this is happening.

"Connection reset by peer" means that the other end of the network connection (MySQL server) has closed the connection. both container reside on the same server instance and same docker instance 
I have been looking for clues but cannot figure it out.
Seems to be a concern with the MySQL (mariadb) instance.
--
I should note that when I manually trigger the job, after the 3rd or 4th attempt the error does not reporduce and works. Then a week later when the cron job runs again, the same error occurs.

Any help is greatly appreciated.

Thank you,

HI guys, anyone able to help?

My nexctcloud instance got out of sync and i 'managed' to get it up to latest version by following (not very well) the upgrade instructions on the support pages. But ..... I now have a virgin brand spanking new nextcloud, no idea where my original has gone if that's important? But, my mariadb db is still hanging around and my question is am i able to swap it IN for the sqlite one that my nextcloud is now using. I am assuming that all the settings and contents will still be preserved but have absolutely no idea how to fix??

17 hours ago, superloopy1 said:

HI guys, anyone able to help?

My nexctcloud instance got out of sync and i 'managed' to get it up to latest version by following (not very well) the upgrade instructions on the support pages. But ..... I now have a virgin brand spanking new nextcloud, no idea where my original has gone if that's important? But, my mariadb db is still hanging around and my question is am i able to swap it IN for the sqlite one that my nextcloud is now using. I am assuming that all the settings and contents will still be preserved but have absolutely no idea how to fix??

Probably better to post in the nextcloud thread since this is related to nextcloud.

And post exactly what you have done. Nobody can help when you don't supply detailed information.

1 hour ago, saarg said:

Probably better to post in the nextcloud thread since this is related to nextcloud.

And post exactly what you have done. Nobody can help when you don't supply detailed information.

thanks, ill give it a go. just thought that maybe hooking up an existing mariadb would involve mariadb commands hence post here, no doubting i'll be back.

  • 3 weeks later...

Got a strange issue, when i run command

mysql -u root -p bookstack

i get the following error

 

# mysql -u root -p bookstack
Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

 

Any guides or tips on how to fix this.

  • 2 weeks later...

Is anybody using a web based form builder with MariaDB?

  • 2 weeks later...

Is there a procedure to migrate nextcloud on a mysql database to mariadb?

 

I've done it, it's fairly straight forward to migrate the DB from mysql to mariadb, you can use mysqldump to backup from mysql and then import into mariadb.

 

It's slightly more complicated to edit the nextcloud config though if you're using different DB credentials. In theory if the credentials are the same then nextcloud will just work when you restart the docker.

I updated the docker yesterday and that led to the install being corrupted (couldn't log in anymore, ibdata1 was pretty much fried). I didn't have any mysql backups (which is stupid, I know ;-)) but luckily I also just set up my server last weekend. I didn't lose much I can't quickly recreate.

 

My question becomes: what's the best way of updating this docker? Should I first shut down all the other dockers that use MariaDB before applying the update? I will have /appdata/ backups from now on, but that's of course no solution to an update that causes corruption.

 

Thanks so much ahead.

 

All the best,

Benedikt

1 hour ago, benediktleb said:

I updated the docker yesterday and that led to the install being corrupted (couldn't log in anymore, ibdata1 was pretty much fried). I didn't have any mysql backups (which is stupid, I know ;-)) but luckily I also just set up my server last weekend. I didn't lose much I can't quickly recreate.

 

My question becomes: what's the best way of updating this docker? Should I first shut down all the other dockers that use MariaDB before applying the update? I will have /appdata/ backups from now on, but that's of course no solution to an update that causes corruption.

 

Thanks so much ahead.

 

All the best,

Benedikt

I highly doubt it's the update that is the issue. It's probably docker that force the container off that causes the corruption.

I always shut down other containers using mariadb before updating it.

24 minutes ago, saarg said:

I highly doubt it's the update that is the issue. It's probably docker that force the container off that causes the corruption.

I always shut down other containers using mariadb before updating it.

Thank you! I'll shut others down, first, and then the mariadb docker. Do you use unRAIDs UI to shut it down or do you use the command line of that particular docker?

7 hours ago, benediktleb said:

Thank you! I'll shut others down, first, and then the mariadb docker. Do you use unRAIDs UI to shut it down or do you use the command line of that particular docker?

I have used unraid to shut it down.

Can't type anything. Just getting this error on first time install. 

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

 

See heaps of things online on how to fix it, but most of them start with 'sudo' and that command isn't found.

6 hours ago, marshy919 said:

Can't type anything. Just getting this error on first time install. 

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

 

See heaps of things online on how to fix it, but most of them start with 'sudo' and that command isn't found.

Sorry, crystal ball is still in repair shop.

 

If you want help, a more detailed description of what you are doing, container logs (full) and docker run command (no screenshots) needs to be posted.

Hello,

I've been stuck for a week or so on updating my nextcloud.   I think it has something to do with my mariadb.

 

This is the error I receive when trying to update nextcloud.

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2006] MySQL server has gone away in /config/www/nextcloud/lib/private/DB/Connection.php:68

 

Below is just looping over and over in my mariadb docker log file:

210316 15:31:20 mysqld_safe Logging to syslog.
210316 15:31:20 mysqld_safe Starting mysqld daemon with databases from /config/databases

 

I'm not entirely sure what to attempt next....thanks for any help.

Edited by waymon

47 minutes ago, waymon said:

Hello,

I've been stuck for a week or so on updating my nextcloud.   I think it has something to do with my mariadb.

 

This is the error I receive when trying to update nextcloud.


Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2006] MySQL server has gone away in /config/www/nextcloud/lib/private/DB/Connection.php:68

 

Below is just looping over and over in my mariadb docker log file:


210316 15:31:20 mysqld_safe Logging to syslog.
210316 15:31:20 mysqld_safe Starting mysqld daemon with databases from /config/databases

 

I'm not entirely sure what to attempt next....thanks for any help.

 

I added

innodb_force_recovery = 6

to my custom.cnf

 

Onto other issues now.

Okay, I attempted to create a new nextcloud by removing the docker and starting fresh.

 

However, it looks like its my mariadb.  Not sure what is happening but I get stuck in a loop with:

mysqld_safe Logging to syslog.
mysqld_safe Starting mysqld daemon with databases from /config/databases

 

If I add 'innodb_force_recovery = 6' to my custom.cnf. I can get it to load but then my tables are read only. 

'oc_migrations` (errno: 165 "Table is read only")

I shouldn't have to have this line in my config though....

 

So, I only use mariadb for Bookstack and Nextcloud. I'm okay with starting fresh in Nextcloud but it would stink to reenter stuff into Bookstack.  How do I dump my data from my Bookstack database and start fresh?

 

Thanks!

Edited by waymon

  • 2 weeks later...

Hello,

 

What is the simplest way to delete a false created database?
Could I delete the Folder (database) in \\10.0.0.20\appdata\mariadb\databases ?

 

EDIT: Solution -> First show all databases with " SHOW DATABASES; "

                         Delete the database you want with " DROP DATABASE databasename; "

 

 

Edited by MPHxLegend

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.