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 7/21/2023 at 6:43 PM, jademonkee said:

FWIW, I copied all the .err files to a new directory (just in case), I then deleted all of them except the one listed in the logs at start-up.

I then renamed the active log file to <filename>.err.old

I then logged into the mysql console by opening the mariadb console via the Unraid GUI, then issuing the command:

mysql -uroot -p

As per https://mariadb.com/kb/en/flush/, I then issued the command to close and reopen the .err file (basically recreate it)

flush error logs;

Now the .err file is KB in size, and I have recovered 3GB of space on the cache drive by clearing the errors that have been accumulating for a couple years now.

Fingers crossed I haven't messed anything up!

 

tried and this is the result :

 

root@a5ca99f8f429:/# mysql -uroot -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
root@a5ca99f8f429:/# 

 

  • Replies 623
  • Views 232.5k
  • 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

1 hour ago, DrSiva2022 said:

 

tried and this is the result :

 

root@a5ca99f8f429:/# mysql -uroot -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
root@a5ca99f8f429:/# 

 

Sorry, I don't know what that error means.

LS.io no longer offer support through this forum, instead offering it through their Discord, so maybe try there.

ok i moved all .err and ib_xyz files to a folder and restarted mariadb.

 

Now its not logging that much error . but logs like this

 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

[custom-init] No custom files found, skipping...
UMASK corrected from 022 to 0640 ...
230810 15:19:07 mysqld_safe Logging to '/config/databases/1ea560a3a27c.err'.
230810 15:19:07 mysqld_safe Starting mariadbd daemon with databases from /config/databases
[ls.io-init] done.

 

 

when you go into 1ea...... .err file . this is what is inside

 

230810 15:19:07 mysqld_safe Starting mariadbd daemon with databases from /config/databases
2023-08-10 15:19:07 0 [Note] Starting MariaDB 10.6.13-MariaDB-log source revision a24f2bb50ba4a!!!!!!!!d584937f36 as process 363
2023-08-10 15:19:07 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2023-08-10 15:19:07 0 [Note] InnoDB: Number of pools: 1
2023-08-10 15:19:07 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-08-10 15:19:07 0 [Note] mariadbd: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
2023-08-10 15:19:07 0 [Note] InnoDB: Using Linux native AIO
2023-08-10 15:19:07 0 [Note] InnoDB: Initializing buffer pool, total size = 268435456, chunk size = 134217728
2023-08-10 15:19:07 0 [Note] InnoDB: Completed initialization of buffer pool
2023-08-10 15:19:07 0 [Note] InnoDB: 128 rollback segments are active.
2023-08-10 15:19:07 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-08-10 15:19:07 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-08-10 15:19:07 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2023-08-10 15:19:07 0 [Note] InnoDB: 10.6.13 started; log sequence number 33112; transaction id 4
2023-08-10 15:19:07 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-08-10 15:19:07 0 [Note] InnoDB: Loading buffer pool(s) from /config/databases/ib_buffer_pool
2023-08-10 15:19:07 0 [Note] InnoDB: Buffer pool(s) load completed at 230810 15:19:07
2023-08-10 15:19:07 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
2023-08-10 15:19:07 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-08-10 15:19:07 0 [Note] Server socket created on IP: '::'.
2023-08-10 15:19:07 0 [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(141).
2023-08-10 15:19:07 0 [ERROR] mariadbd: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
2023-08-10 15:19:07 2 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
2023-08-10 15:19:07 0 [Note] /usr/bin/mariadbd: ready for connections.
Version: '10.6.13-MariaDB-log'  socket: '/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server
2023-08-10 15:19:08 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
2023-08-10 15:19:08 5 [Warning] Access denied for user 'root'@'localhost' (using password: YES)

 

Pls someone help...

  • 2 weeks later...

Noob here. I installed nextcloud using spaceinvaderone's tutorial and it has been running fine for like 2 years. I decided to add some drives and a second parity. That was accomplished without fault. Or so I thought. When I restarted everything all the apps were not there. I had to reinstall them by going to the "previous installed" tab. 

 

Now I get this error from mariadb:

 

cp: not replacing '/config/custom.cnf'
[custom-init] No custom files found, skipping...
230820 08:40:26 mysqld_safe Logging to '/config/databases/b9c1c3db04f5.err'.
230820 08:40:26 mysqld_safe Starting mariadbd daemon with databases from /config/databases

 

I tried searching the interwebs for instructions but couldn't find anything. Not sure where to turn to next. 

 

Thanks.

 

What is inside '/config/databases/b9c1c3db04f5.err
It should be under your appdata/mariadb folder.


Gesendet von meinem Pixel 6 Pro mit Tapatalk

39 minutes ago, Archonw said:

What is inside '/config/databases/b9c1c3db04f5.err
It should be under your appdata/mariadb folder.


Gesendet von meinem Pixel 6 Pro mit Tapatalk
 

image.png.92389a0f04bfcdcc3dde252895bab48d.png

how can i see the number of user accounts on mariadb? i have tried running SELECT User FROM mysql.user; but comes back as ERROR 1142 (42000): SELECT command denied to user. I will ask if it's possible to change username of an account to something else? Please.

  • 3 months later...

Firstly I am very much a beginner with this so this may be a stupid query.

 

I updated the dockers for Swag, MariaDB and Nextcloud. Since then Nextcloud has been stuck in maintenance mode with the below log:

 

In ExceptionConverter.php line 117:

   An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'nextcloud.oc_external_config' doesn't exist in engine

In Exception.php line 28:

    SQLSTATE[42S02]: Base table or view not found: 1932 Table 'nextcloud.oc_external_config' doesn't exist in engine

In Connection.php line 71:

     SQLSTATE[42S02]: Base table or view not found: 1932 Table 'nextcloud.oc_external_config' doesn't exist in engine

 

I then looked in the MariaDB log and it wanted me to run a manual update via the consol. I ran the update and got the following in the MariaDB log:

MariaDB upgrade log:
Error    : Table 'nextcloud.oc_external_applicable' doesn't exist in engine
status   : Operation failed
nextcloud.oc_external_config
Error    : Table 'nextcloud.oc_external_config' doesn't exist in engine
status   : Operation failed
nextcloud.oc_external_mounts
Error    : Table 'nextcloud.oc_external_mounts' doesn't exist in engine
status   : Operation failed
nextcloud.oc_external_options
Error    : Table 'nextcloud.oc_external_options' doesn't exist in engine
status   : Operation failed
nextcloud.oc_files_metadata
Error    : Table 'nextcloud.oc_files_metadata' doesn't exist in engine
status   : Operation failed
nextcloud.oc_files_metadata_index
Error    : Table 'nextcloud.oc_files_metadata_index' doesn't exist in engine
status   : Operation failed
nextcloud.oc_onlyoffice_filekey
Error    : Table 'nextcloud.oc_onlyoffice_filekey' doesn't exist in engine
status   : Operation failed
nextcloud.oc_text2image_tasks
Error    : Table 'nextcloud.oc_text2image_tasks' doesn't exist in engine
status   : Operation failed
Phase 7/8: uninstalling plugins
Phase 8/8: Running 'FLUSH PRIVILEGES'
 

I have asked in the Nextcloud forum and the opinion there is that it is likely a database issue.

 

I haven't lost any of the date but it appears that several nextcloud tables have gone missing after the update. Can anyone help on how I can resolve this?

 

Thanks in advance

I'm having a similar issue to the person above, but only with "oc_files_versions".

 

Piece from my post in the Nextcloud topic:

Upon checking the database with adminer, I see that the table exists, but it doesn´t have the 'InnoDB' engine, it's blank. The same with the 'collation' column. The rest of the columns have the value: "?".

If I click on the table, I also get the error that it doesn't exist in this engine. This way I can´t manually try to fix the table.

Due to this I can´t create a backup of the database, since it gives me an error. I've tried to 'occ upgrade' in the nextcloud terminal, but that stops at the same error. Forcing MariaDB to upgrade again just gives the same error.

Rolling back to a previous version of nextcloud doesn't do anyhing either. I'm stuck in maintenance mode (nothing is fixed when I disable it).

Any help would be greatly appreciated.

 

From what I understand the table is not corrupt, but for some reason MariaDB can't find/read them. It lists it, but claims it doens't exist.

I've tried looking for a fix myself, but since my knowledge of databases is too limited, I'm careful.

Is there any hope, or should I see this as a loss? (And my own mistake for not making adequate backups)

  • 4 months later...

Not sure if I put this in the right place or not....

 

Hi,

 

Is it possible to split the MariaDB databases from appdata/mariadb and move just the databaes to the array?  If so, what is the best way to do that?

 

my mariadb databases are large 1.7TB and the cache array is only 2TB.

 

Thanks,

Robert

 

Edited by rshuler

  • 5 months later...

I'm having trouble with nextcloud and im hearing it has something to do with mariadb.  Everything was working fine prior to the failed upgrade of nextcloud. So i looked in my mariadb logs and its repeating this over and over again, 24/7.  Are there issues here or is this normal?

 

241030 15:00:59 mysqld_safe Logging to syslog.
241030 15:00:59 mysqld_safe Starting mysqld daemon with databases from /config/databases
241030 15:01:01 mysqld_safe Logging to syslog.
241030 15:01:01 mysqld_safe Starting mysqld daemon with databases from /config/databases
241030 15:01:02 mysqld_safe Logging to syslog.
241030 15:01:02 mysqld_safe Starting mysqld daemon with databases from /config/databases
241030 15:01:03 mysqld_safe Logging to syslog.
241030 15:01:03 mysqld_safe Starting mysqld daemon with databases from /config/databases
241030 15:01:05 mysqld_safe Logging to syslog.
241030 15:01:05 mysqld_safe Starting mysqld daemon with databases from /config/databases

 

  • 2 weeks later...

Hello,

I'm having some trouble to connect to the db.

I got this error :
 

SQLSTATE[HY000] [1045] Access denied for user 'rayman'@'172.17.0.1' (using password: YES)

 

If i try with adminer, it works perfectly but not with a simple php code.

 

<?php
$serveur = "192.168.1.9:3307";
$utilisateur = "rayman";
$motDePasse = "xxxxxxx";
$baseDeDonnees = "DB_NAME";

$dsn = 'mysql:host='.$serveur.';dbname='.$baseDeDonnees;

/*
	Connexion DB
*/
// Connexion à la base de données MySQL
try {
    $bdd = new PDO($dsn, $utilisateur, $motDePasse);
    // Configurez PDO pour générer des exceptions en cas d'erreur
    $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
    die('Erreur de connexion à la base de données : ' . $e->getMessage());
}

 

 

So I use the same IP:host as adminer but i get a access denied.

Also I don't understand the ip 172.17.0.1 as my unraid ip is 192.168.1.9
Is someone can help me ? thx a lot !

  • 1 month later...

I set up my mariadb container years ago to use it for my iobroker and it is working without any problems.

Today a want to try out nextcloud and to use nextcloud I want to add a database in mariadb but I am unable to login with adminer:

image.png.4dbc8fe3f9fddeafa12f3b7fe89a19bd.png 

I change the MYSQL_ROOT_PASSWORD variable to "root" to be sure to use the right password but it is still not working.

I tried to login in via console but that is not working either:

image.png.9371f25f76c1156ea05600a01c5c663e.png

 

Is there a way to regain access to my mariadb? I dont what to lose years of collected iobroker data

Edited by bubiman
added info

  • 1 month later...

I have an issue with my mariadb container. It was running for a long time without issues, but something seems to have happened to it. This is what I get in the logs:

```

cat: /run/mysqld/mysqld.pid: No such file or directory
250215 00:08:48 mysqld_safe Logging to '/config/databases/ed7c28586f1d.err'.
250215 00:08:48 mysqld_safe Starting mariadbd daemon with databases from /config/databases
Caught SIGTERM signal!

```

  • 2 weeks later...

How to reset root password?

Hi - I'm having problems connecting to Nextcloud and in my mariadb logs it says:

 

#################################################################
#                                                               #
#           An upgrade is required on your databases.           #
#                                                               #
#         Stop any services that are accessing databases        #
#          in this container, and then run the command          #
#                                                               #
#                   mariadb-upgrade -u root                     #
#                                                               #
#################################################################


I've tried but I get this:

 

root@d24f65b19878:/# mariadb-upgrade -u root
Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
FATAL ERROR: Upgrade failed


I'm not very good with linux - am I doing something wrong?

Thanks in advance.

I used:

mariadb-upgrade -u root -p'root-password'

 

20 minutes ago, Archonw said:

I used:

mariadb-upgrade -u root -p'root-password'

 

Thanks.

I'm I doing something wrong?

 

root@d24f65b19878:/# mariadb-upgrade -u root -p
Enter password: 
Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed

 

Did you use the root password or the user password?

2 hours ago, Archonw said:

Did you use the root password or the user password?

I've tried the docker mysql root password and also my unRAID root password

After the upgrade i appear to be getting an error.   

MariaDB-2.JPG

  • 4 months later...
On 3/7/2025 at 12:02 AM, Jono W said:

After the upgrade i appear to be getting an error.   

MariaDB-2.JPG

Facing the same problem. Anybody who can help?

Logfile-information:

2025-07-15 0:53:48 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)

2025-07-15 0:53:48 6 [Warning] Access denied for user 'root'@'localhost' (using password: YES)

Many thanks!

Br

JEns

hi, same problem here

as i formated my cache nvme i lost many of my data. i repaired my swag and nextcloud (i hope so) but i am still stuck at the mariadb docker to get ready again.

i get this error in the protocoll

i hope you guys can help me to get this to run

lg max

Screenshot (38).png

Screenshot (39).png

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.