How to delete mysql databases?
|
3rd Apr, 2018, 12:27 AM
Post: #1
|
|||
|
|||
How to delete mysql databases?
Before I make a mess of things How do I completely remove the music databases? Can I just remove what is in /home/xbian/.kodi/databases or is that not a good idea?
The reason is that things got a little corrupted (wrong images showing for example) and now the host pi and clients cannot read the db at all. So I think the safest route is to delete the old ones and rebuild from scratch. |
|||
3rd Apr, 2018, 02:41 AM
Post: #2
|
|||
|
|||
RE: How to delete mysql databases?
AFAIR you have a common mysql db for all your clients, right?
|
|||
3rd Apr, 2018, 02:53 AM
Post: #3
|
|||
|
|||
RE: How to delete mysql databases?
Yes - good memory!
|
|||
3rd Apr, 2018, 10:57 PM
Post: #4
|
|||
|
|||
RE: How to delete mysql databases?
Had a bit more time on this today and it is a little confusing...Here is what happends......
Kodi is set to scan libraries at start up - but it doesn't seem to .No scanning on the top right of the screen (hide scanning is not checked) so I assume it is not working.... The music library remains empty (was populated before though, no idea what happened to it). If I add a SMB folder to the music library it adds that folder. I scan folder to library and that completes, but back on the main kodi menu I get nothing except the default message about nothing in the music library. Movies, tvshows, music videos show sometimes, but not always. (This bit really puzzles me right now) If I use yatse to http control the pi and update libraries the videos showup after scanning, but music does not (maybe locally cached by yatse?) - but If i select update video libraries all videos show on yatse and the kodi main page. If I do the same for music libraries I can now see the scanning of smb music folder on the top right of Kodi, but still on completion I get nothing in the music libraries. I tried to clean the music library, but after 14 hours there was no progress on the progressbar (stuck at the begining). It was working normally a few weeks back, I really don't know what caused this or how to fix. Will keep digging. Hmmmm..... |
|||
3rd Apr, 2018, 11:25 PM
(This post was last modified: 4th Apr, 2018 12:35 AM by Nachteule.)
Post: #5
|
|||
|
|||
RE: How to delete mysql databases?
1) You should have a look into Kodi logfile(s)
2) Check you mysql database (I'm not db expert, but I'm sure google is your friend) 3) Check fs of your db server, maybe fs is corrupt or disk is broken Back to your first question: Removing database files in /home/xbian/.kodi/Database is very bad idea, because in case of using common mysql db the relevant local db files are not used and should not exist locally |
|||
4th Apr, 2018, 07:31 PM
Post: #6
|
|||
|
|||
RE: How to delete mysql databases?
@Nachteule
Thanks for the reply and ideas. I have spent more time on it, still a problem though as I can't play music on any client until this is fixed. I do know that running from usb means corruption is unlikely of the system, all other things are unaffected. I can get kodi to see the server with the media, I can add media to kodi, I can scan in the contents with add to library (all looks ok) and then back to the begining again. I'll look into 'droptables' today and see how I get on. Cheers! |
|||
4th Apr, 2018, 09:42 PM
Post: #7
|
|||
|
|||
RE: How to delete mysql databases?
Hmmm, that's really strange
I'm using common mysql db for years, never had any problems Maybe you have to repair your mysql db, as described here, for example |
|||
5th Apr, 2018, 04:26 AM
Post: #8
|
|||
|
|||
RE: How to delete mysql databases?
(4th Apr, 2018 09:42 PM)Nachteule Wrote: Hmmm, that's really strange Tell me about it! (4th Apr, 2018 09:42 PM)Nachteule Wrote: I'm using common mysql db for years, never had any problems I could have said the same until recently. Thanks for the pointer. Very interesting reading. I now know that all the kodi db are OK. Seems like the innodb is the problem... so making a little progress. Unfortunately, I got to a point where the pi wouldn't boot any more and an now flashing an image from 2 weeks ago to see if the problem was present then. I'll keep you all updated with another thrilling post soon..... |
|||
5th Apr, 2018, 04:48 AM
Post: #9
|
|||
|
|||
RE: How to delete mysql databases?
Huhhhh, I can't wait any longer
|
|||
17th Apr, 2018, 10:07 PM
Post: #10
|
|||
|
|||
RE: How to delete mysql databases?
No more waiting now
I got some time on this today and what I find is not encouraging. First off, one of two smb mounts was not mounting correctly. Then I discover that parts of the system have become read only and ... Terminal xbian@cinema2film ~ $ sudo btrfs-auto-snapshot list root Error: unable to mount the filesystem and finally dmesg gives a lot of errors ... Terminal [ 84.406812] systemd-logind[2931]: Failed to start user service, ignoring: Unk nown unit: user@1000.service [ 84.487202] systemd-logind[2931]: New session c1 of user xbian. [ 84.727016] init: wait-for-state (xbmcxbmc-loaded) main process (2574) killed by TERM signal [ 91.920877] init: xbmc-failed-start main process (527) killed by TERM signal [ 91.930818] init: wait-for-state (zram-swapxbmc-done) main process (1639) kil led by TERM signal [ 92.249276] init: ntp main process (4610) terminated with status 1 [ 92.251857] init: mounted-tmp main process (4614) terminated with status 1 [ 92.526839] zram: Added device: zram0 [ 92.539098] zram: Added device: zram1 [ 92.546582] zram: Added device: zram2 [ 92.556261] zram: Added device: zram3 [ 92.734951] zram0: detected capacity change from 0 to 134217728 [ 92.850964] Adding 131068k swap on /dev/zram0. Priority:20 extents:1 across: 131068k SSFS [ 93.732627] Adding 250876k swap on /dev/mmcblk0p3. Priority:0 extents:1 acro ss:250876k SSFS [ 93.837618] Adding 250876k swap on /dev/sda2. Priority:0 extents:1 across:25 0876k FS [ 106.673171] systemd-logind[2931]: New session c2 of user xbian. [ 144.834867] BTRFS info (device sda1): disk space caching is enabled [ 145.182856] BTRFS info (device sda1): disk space caching is enabled [ 242.233587] CIFS VFS: Autodisabling the use of server inode numbers on \\192. 168.1.222\media. This server doesn't seem to support them properly. Hardlinks wi ll not be recognized on this mount. Consider mounting with the "noserverino" opt ion to silence this message. [ 2165.936871] init: xbmc main process (2560) killed by TERM signal [ 2167.815431] init: wait-for-state (kill-splashxbmc-exits) main process (26474) killed by TERM signal [ 2181.041520] systemd-logind[2931]: New session c3 of user xbian. [ 2181.289062] init: wait-for-state (xbmcxbmc-loaded) main process (26542) kille d by TERM signal [ 2672.592448] init: xbmc-priority main process (32252) terminated with status 1 [ 2908.154952] systemd-logind[2931]: New session c4 of user xbian. [ 2908.426274] init: wait-for-state (xbmcxbmc-loaded) main process (2435) killed by TERM signal [ 2931.800339] usb 1-1.5: reset high-speed USB device number 5 using dwc_otg [ 2931.899491] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 1, rd 0, flush 0, corrupt 0, gen 0 [ 2931.899843] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 1, rd 1, flush 0, corrupt 0, gen 0 [ 2931.900001] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 2, rd 1, flush 0, corrupt 0, gen 0 [ 2931.900293] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 3, rd 1, flush 0, corrupt 0, gen 0 [ 2931.900459] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 4, rd 1, flush 0, corrupt 0, gen 0 [ 2931.900502] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 5, rd 1, flush 0, corrupt 0, gen 0 [ 2931.907308] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 5, rd 2, flush 0, corrupt 0, gen 0 [ 2931.909468] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 6, rd 2, flush 0, corrupt 0, gen 0 [ 2931.915573] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 7, rd 2, flush 0, corrupt 0, gen 0 [ 2931.919195] BTRFS error (device sda1): error reading free space cache [ 2931.919266] BTRFS warning (device sda1): failed to load free space cache for block group 3510632448, rebuilding it now [ 2931.920987] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 7, rd 3, flush 0, corrupt 0, gen 0 [ 2931.923970] sd 0:0:0:0: [sda] 31260672 512-byte logical blocks: (16.0 GB/14.9 GiB) [ 2964.233000] usb 1-1.5: reset high-speed USB device number 5 using dwc_otg [ 2964.354617] sd 0:0:0:0: [sda] 31260672 512-byte logical blocks: (16.0 GB/14.9 GiB) [ 2996.654037] usb 1-1.5: reset high-speed USB device number 5 using dwc_otg [ 2998.591240] BTRFS: error (device sda1) in btrfs_commit_transaction:2227: errn o=-5 IO failure (Error while writing out transaction) [ 2998.591261] BTRFS info (device sda1): forced readonly [ 2998.591283] BTRFS warning (device sda1): Skipping commit of aborted transacti on. [ 2998.591294] ------------[ cut here ]------------ [ 2998.591328] WARNING: CPU: 1 PID: 351 at fs/btrfs/transaction.c:1850 btrfs_com mit_transaction+0xa48/0xcd4 [ 2998.591337] BTRFS: Transaction aborted (error -5) [ 2998.591345] Modules linked in: zram zsmalloc arc4 ecb md4 md5 hmac nls_utf8 s nd_soc_wm8804_i2c snd_soc_wm8804 sg snd_soc_hifiberry_digi snd_soc_bcm2835_i2s s nd_soc_core snd_compress snd_pcm_dmaengine i2c_bcm2835 bcm2835_gpiomem fixed uio _pdrv_genirq uio snd_bcm2835 snd_pcm snd_timer snd cifs evdev rpcsec_gss_krb5 ui nput i2c_dev i2c_bcm2708 [ 2998.591544] CPU: 1 PID: 351 Comm: btrfs-transacti Not tainted 4.9.91+ #1 [ 2998.591553] Hardware name: BCM2835 [ 2998.591592] [<8010fe20>] (unwind_backtrace) from [<8010c320>] (show_stack+0x2 0/0x24) [ 2998.591617] [<8010c320>] (show_stack) from [<80537ccc>] (dump_stack+0xcc/0x11 0) [ 2998.591644] [<80537ccc>] (dump_stack) from [<8011d5b4>] (__warn+0xf8/0x110) [ 2998.591669] [<8011d5b4>] (__warn) from [<8011d614>] (warn_slowpath_fmt+0x48/0 x50) [ 2998.591694] [<8011d614>] (warn_slowpath_fmt) from [<804107d4>] (btrfs_commit_ transaction+0xa48/0xcd4) [ 2998.591717] [<804107d4>] (btrfs_commit_transaction) from [<8040b06c>] (transa ction_kthread+0x18c/0x1b0) [ 2998.591744] [<8040b06c>] (transaction_kthread) from [<8013ccc8>] (kthread+0x1 0c/0x124) [ 2998.591765] [<8013ccc8>] (kthread) from [<80108394>] (ret_from_fork+0x14/0x20 ) [ 2998.591777] ---[ end trace 25dd3e99ddf5d615 ]--- [ 2998.591793] BTRFS: error (device sda1) in cleanup_transaction:1850: errno=-5 IO failure [ 2998.591810] BTRFS info (device sda1): delayed_refs has NO entry [ 2998.645992] BTRFS info (device sda1): delayed_refs has NO entry [ 4093.748096] BTRFS info (device sda1): disk space caching is enabled [ 4093.748123] BTRFS error (device sda1): Remounting read-write after error is n ot allowed [ 4120.233723] BTRFS info (device sda1): disk space caching is enabled [ 4120.233746] BTRFS error (device sda1): Remounting read-write after error is n ot allowed [ 4145.545056] BTRFS info (device sda1): disk space caching is enabled [ 4145.545082] BTRFS error (device sda1): Remounting read-write after error is n ot allowed [ 4146.810294] BTRFS info (device sda1): disk space caching is enabled [ 4146.810317] BTRFS error (device sda1): Remounting read-write after error is n ot allowed [ 4147.893988] BTRFS info (device sda1): disk space caching is enabled [ 4147.894008] BTRFS error (device sda1): Remounting read-write after error is n ot allowed [ 4148.730626] BTRFS info (device sda1): disk space caching is enabled [ 4148.730650] BTRFS error (device sda1): Remounting read-write after error is n ot allowed Not very good is it? Time for a fresh install I think Oddly it still all works (except one database not responding) - and this one runs from a usb drive, only boots from sd card. Maybe some corruption from the power cut but I guess I 'll never know for sure. |
|||
17th Apr, 2018, 10:49 PM
Post: #11
|
|||
|
|||
RE: How to delete mysql databases?
(17th Apr, 2018 10:07 PM)Skywatch Wrote: Not very good is it? Absolutely Quote:[ 2931.923970] sd 0:0:0:0: [sda] 31260672 512-byte logical blocks: (16.0 GB/14.9 GiB) Those resets makes me nervous. While BTRFS tries to repair itself, those resets occurs. That' confusing BTRFS for sure No idea where it came from - maybe your external usb stick has reached end of life Quote:Time for a fresh install I think Its probably faster than repairing that damaged system Quote:Oddly it still all works (except one database not responding) - and this one runs from a usb drive, only boots from sd card. Maybe some corruption from the power cut but I guess I 'll never know for sure. Who knows .... |
|||
18th Apr, 2018, 01:23 AM
Post: #12
|
|||
|
|||
RE: How to delete mysql databases?
Indeed I found some logs today and they were not pretty reading either. Lots of connections to mysql server 'refused' ??? All pretty academic now as I won't spend more time except to re-install it all. Even all the backups were 'corrupted' the same way - tried a few of them and all the same.
So I am now compiling a list of things to install, configure, set up, modify etc in order to rebuild this one. The USB/SD were new about a year ago. Both either sandisk or samsung, so shouldn't really be the problem. I will test both before deciding to reuse or replace them (note to self to check if pi drive has become available yet). |
|||
18th Apr, 2018, 01:44 AM
Post: #13
|
|||
|
|||
RE: How to delete mysql databases?
(18th Apr, 2018 01:23 AM)Skywatch Wrote: Even all the backups were 'corrupted' the same way - tried a few of them and all the same. That's the most annoying problem of backups. You never know if backups are ok unless you have to use them How many backups do you have? I'm running backup weekly and keep 4 images. This is enough for me |
|||
18th Apr, 2018, 07:44 AM
Post: #14
|
|||
|
|||
How to delete mysql databases?
Looks like bitrot may have slowly got the better of your media.
Please read rules and do a search before you post! | FAQs | How to post log file? | Can't find an answer? Contact us. |
|||
19th Apr, 2018, 08:11 PM
Post: #15
|
|||
|
|||
RE: How to delete mysql databases?
@fivefour
I tested the sd card with windows and h2wtest and both reported no problems with it. ??? With new install I now have a very strange problem with video that defies all my faultfinding logic so far..... |
|||
« Next Oldest | Next Newest »
|