[Support] Linuxserver.io - MariaDB


Recommended Posts

11 hours ago, CHBMB said:

Looks like a template error to me....

 

Remove both the nextcloud container and image and the mariadb container and image, try re-adding from a blank template.

 

That didn't help. I removed both. Started fresh, when i try to install with default values it gives the same error. If i try and install using my mariadb-nextcloud details, it installs fine. Bizarre. Any other ideas? :)

Link to comment

Post the xml file (/config/plugins/dockerMan/templates-user/my-{whateverYouNamedTheContainer} on the flash drive) after it fails to install

 

To me, it appears that possibly you're using some weird characters within the password entry that's messing up everything (or the flash drive is pooched)

Link to comment

It was the password. Funny because I've been using the same password for the last 6 months or so. Also, I tried changing the password as one of my troubleshooting steps before posting. But it didn't like that one either . Had to remove any special characters.

Thanks gents!

Sent from my ONEPLUS A3000 using Tapatalk

Link to comment
17 minutes ago, Kewjoe said:

It was the password. Funny because I've been using the same password for the last 6 months or so. Also, I tried changing the password as one of my troubleshooting steps before posting. But it didn't like that one either emoji2.png. Had to remove any special characters.

Thanks gents!

Sent from my ONEPLUS A3000 using Tapatalk
 

Biggies to avoid would be < > &

Link to comment
  • 3 weeks later...

Can someone help me to understand how to connect to the MariaDB instance with `root` login.

 

When I install the docker container I specified a password in Key3: (Container Variable: MYSQL_ROOT_PASSWORD) and then after MariaDB docker container started I tried to connect from my windows machine (MySQL Workbench) but I'm just getting the access denied error

"Access denied for user 'root'@'10.0.0.5' (using password: YES)"

here my windows machine Ip is 10.0.0.5

 

Then I connected to my unraid command line and bash into docker container

 docker exec -i -t  c2 /bin/bash

and then tried mysql command line to connect

 mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Can anyone tell me where is the issue? thanks a lot

Link to comment

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> use mysql;
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='root';
mysql> flush privileges;
mysql> quit

and I managed to login again with new password (both from docker instance and remotely from my windows machine) - Then I restarted the mariadb docker and then I can see it cannot start properly and in a endless loop

 

[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
_ _ _
| |___| (_) ___
| / __| | |/ _ \
| \__ \ | | (_) |
|_|___/ |_|\___/
|_|

Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donations/
-------------------------------------
GID/UID
-------------------------------------
User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30_config: executing...
[cont-init.d] 30_config: exited 0.
[cont-init.d] 40-initialise-db: executing...
[cont-init.d] 40-initialise-db: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
170906 08:38:30 mysqld_safe Logging to syslog.
170906 08:38:30 mysqld_safe Starting mysqld daemon with databases from /config/databases
170906 08:38:34 mysqld_safe Logging to syslog.
170906 08:38:34 mysqld_safe Starting mysqld daemon with databases from /config/databases
170906 08:38:37 mysqld_safe Logging to syslog.
170906 08:38:37 mysqld_safe Starting mysqld daemon with databases from /config/databases
170906 08:38:40 mysqld_safe Logging to syslog.
170906 08:38:40 mysqld_safe Starting mysqld daemon with databases from /config/databases
170906 08:38:44 mysqld_safe Logging to syslog.
170906 08:38:44 mysqld_safe Starting mysqld daemon with databases from /config/databases
170906 08:38:47 mysqld_safe Logging to syslog.
170906 08:38:47 mysqld_safe Starting mysqld daemon with databases from /config/databases
170906 08:38:50 mysqld_safe Logging to syslog.

Also not from the docker instance itself

 

root@2262d249c970:/# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

 

  • Thanks 4
Link to comment
  • 2 weeks later...
  • 4 weeks later...

Just like Vin, I'm having login problems.

 

Running on unraid 6.3.5

 

Install the mariadb docker, set a root password.

 

Start the docker, edit the custom.cnf (as of: https://www.linuxserver.io/2017/05/10/installing-nextcloud-on-unraid-with-letsencrypt-reverse-proxy/).

 

restart docker, run "docker exec -it mariadb-nextcloud bash"

 

And then I can't login with "mysql -uroot -p".

I always get :

mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

 

I tried typing the password in the clear in the docker bash, and it is correct (no problems with 'foreign' keyboards).

 

Help?!?!?

 

Edited by Wimpie
Link to comment

Hi,

 

I have some troubles with my MariaDB. 

I performed a backup (via the backup/restore app) and since then MariaDB is not starting up anymore.

 

If I check the MariaDB-Logs via the Webfrontend I see the following output:

 

mysqld_safe Starting mysql with databases from /config/databases
mysqld_safe Logging to syslog

and this is then cycling...

 

Br,

Johannes

Link to comment

Hi,

 

I was able to solve the issue on my own.

 

The problem was the "nextcloud"-db. I stopped MariaDB, moved the nextcloud db directory to a different location and then started MariaDB without issues.

After that I stopped MariaDB again, moved back the nextcloud db and startet MariaDB. Again no issues...

I do not know why, but it is working.

 

Br,

Johannes

Link to comment
Hi,
 
I was able to solve the issue on my own.
 
The problem was the "nextcloud"-db. I stopped MariaDB, moved the nextcloud db directory to a different location and then started MariaDB without issues.
After that I stopped MariaDB again, moved back the nextcloud db and startet MariaDB. Again no issues...
I do not know why, but it is working.
 
Br,
Johannes
There's a link in the first post and a lot of discussion about this in the thread.

Sent from my LG-H815 using Tapatalk

Link to comment
On 22.10.2017 at 10:20 AM, CHBMB said:

There's a link in the first post and a lot of discussion about this in the thread.

Sent from my LG-H815 using Tapatalk
 

 

Hi,

 

I have again the issue, after an unexpected Powerissue, my MariaDB doenst come up again. If I remove the "nextcloud"-directory and restart MariaDB it is working again.

I tried to add the "nextcloud"-directory again to the database-directory  but this time MariaDB doenst come up as expected.

 

Any other ideas?

 

I have an 2 days old backup of MariaDB. The question is: What happens to Nextcloud? I was running an initial sync over several hours so there is for sure a big difference between the actual Nextcloud-Status and the Backup...

 

Br,

Johannes

Link to comment
9 hours ago, ebnerjoh said:

 

Hi,

 

I have again the issue, after an unexpected Powerissue, my MariaDB doenst come up again. If I remove the "nextcloud"-directory and restart MariaDB it is working again.

I tried to add the "nextcloud"-directory again to the database-directory  but this time MariaDB doenst come up as expected.

 

Any other ideas?

 

I have an 2 days old backup of MariaDB. The question is: What happens to Nextcloud? I was running an initial sync over several hours so there is for sure a big difference between the actual Nextcloud-Status and the Backup...

 

Br,

Johannes

 

You wonder why there is an issue after a power loss? 

Link to comment
48 minutes ago, saarg said:

 

You wonder why there is an issue after a power loss? 

 

Yes and no.

 

No - It is clear that after a power fault something could get corrupt

 

Yes - I am running now since about 8 years a private server. 7,5 years on gentoo and now 6 months on unraid. A unexpected outage of a server can cause a corrupted system/service but it is not 100% sure that this will happen, or for me it seems it is unlikley. For this unlike reason I have a complete offline and also an offsite backup.

This big troubles I experience now since two weeks. The first outage of MariaDB I had after the upgrade of the Docker. And I guess you can confirm that this is not an "unexpected" outage...

 

I have now completley removed and added MariaDB again. Imported all working DBs and now doing an initial setup of nextcloud because I think that something went wrong on the DB after the update.

 

 

Edited by ebnerjoh
Link to comment
  • 1 month later...
10 minutes ago, cantharides999 said:

I'm kinda noob inregard to docker and mariadb, but could anyone explain to me briefly what these values mean/represent when setting up the mariadb docker:

 

container value PUID 99

container value PUIG 100

 

 

They're so that the permissions on files get created properly within the appdata.  Don't change unless you know exactly what you're doing and/or you have a very good reason for it.  IE: They are the proper values

 

If linuxserver ever gets around to publishing v2 templates, then they would probably hide or lock those variables

Link to comment
4 hours ago, Squid said:

They're so that the permissions on files get created properly within the appdata.  Don't change unless you know exactly what you're doing and/or you have a very good reason for it.  IE: They are the proper values

 

If linuxserver ever gets around to publishing v2 templates, then they would probably hide or lock those variables

 

Let's ask @sparklyballs to do the v2 templates :D

Link to comment

I just wanted to chime in here on a fix for the the container seeming to not start properly.

 

There's no need to do a full appdata rollback usually.

 

Log into the container: docker exec -ti mariadb /bin/bash

 

run mysqld from the commandline and you'll get a full dump of what's wrong. It's likely *not* a corrupt database, but rather a transaction stuck in a partially completed state:

 

root@dc9091e5cc9e:/# mysqld
blah
blah
blah
blah
InnoDB: Transaction 133548158 was in the XA prepared state.
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 0 row operations to undo
InnoDB: Trx id counter is 205501440
2017-12-01 21:37:20 47062243925760 [Note] InnoDB: 128 rollback segment(s) are active.
2017-12-01 21:37:20 47063031092992 [Note] InnoDB: Starting in background the rollback of recovered transactions
2017-12-01 21:37:20 47063031092992 [Note] InnoDB: Rollback of non-prepared transactions completed
2017-12-01 21:37:20 47062243925760 [Note] InnoDB: Waiting for purge to start
2017-12-01 21:37:20 47062243925760 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 72011254996
2017-12-01 21:37:20 47062243925760 [Note] Plugin 'FEEDBACK' is disabled.
2017-12-01 21:37:20 47063066740480 [Note] InnoDB: Dumping buffer pool(s) not yet started
2017-12-01 21:37:20 2acd8854df00  InnoDB: Starting recovery for XA transactions...
2017-12-01 21:37:20 2acd8854df00  InnoDB: Transaction 133548158 in prepared state after recovery
2017-12-01 21:37:20 2acd8854df00  InnoDB: Transaction contains changes to 8 rows
2017-12-01 21:37:20 2acd8854df00  InnoDB: 1 transactions in prepared state after recovery
2017-12-01 21:37:20 47062243925760 [Note] Found 1 prepared transaction(s) in InnoDB
2017-12-01 21:37:20 47062243925760 [ERROR] Found 1 prepared transactions! It means that mysqld was not shut down properly last time and critical recovery in                                                 formation (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.
2017-12-01 21:37:20 47062243925760 [ERROR] Aborting

Your choice is to "hulk smash" the partial transaction through, or revert it like it never happened. Both have potential consequences.

 

mysqld --tc-heuristic-recover commit

or

mysqld --tc-heuristic-recover rollback

 

Also, you have backups, right?

  • Like 1
Link to comment
  • 1 month later...

Hi, can I get some guidance for migrating across from my old mysql db that I had for Kodi on unRAID 5? I have just upgraded to unRAID 6.4 so everything is a bit new, apologies for the stupid questions! I've installed the mariadb docker and all seems to be running, I can connect to it from my Mac using a simple MySQL tool.

 

I assume it's possible to copy across the MyMusic and MyVideos DB's that I have on my server into the relevant app data location for adding to mariadb? I believe I need to add a new user 'xbmc' and run permissions to the DB's?

 

Does this sound right? If so, can someone provide some guidance in how I do that? Sorry, real learner when it comes to DB stuff! The instructions I had from my previous MySQL install are as follows;

 

1.     Get into the MySQL command line utility: mysql -u root –p

2.     Enter password, blank

3.     Enter the following commands:

1.     Type in: CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';  and press return

2.     Type in: GRANT ALL ON *.* TO 'xbmc';  and press return

4.     Close out the command line tool with \q

 

I think I do the above after moving the two kodi db's into place? and I need to type the following first to get to docker;

docker exec -i -t  c2 /bin/bash

Is this correct?

Link to comment

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.