[Wiki] Install and configure mysql server and clients

Well this command have set the password as osmc so did you follow that?

Are you sure the database on the first device actually works?

Yes I did that command.
The database works fine on the first device.
The second device saw the database after I deleted all the sources and library info that was already on it plus I Copied these files over from the first device favourites.xml ", " sources.xml ", " mediasources.xml ", " passwords.xml "

The video files play (on nas) but the music files (on sdcard in first device) don’t play on the second device.

Get this error in the log.

DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
11:03:02.121 T:1925896704 DEBUG: CPlayerCoreFactory::GetPlayers: adding audiodefaultplayer (PAPlayer)
11:03:02.121 T:1925896704 DEBUG: CPlayerCoreFactory::GetPlayers: for video=0, audio=1
11:03:02.121 T:1925896704 DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
11:03:02.121 T:1925896704 DEBUG: CPlayerCoreFactory::GetPlayers: adding player: VideoPlayer
11:03:02.121 T:1925896704 DEBUG: CPlayerCoreFactory::GetPlayers: added 2 players
11:03:02.133 T:1718354688 DEBUG: Skin Helper Service --> Kodi_Monitor: sender xbmc - method: Playlist.OnAdd - data: {“item”:{“id”:918,“type”:“song”},“playlistid”:0,“position”:3}
11:03:02.154 T:1925896704 ERROR: Init: Error opening file musicdb://albums/406/918.mp3?albumid=406
11:03:02.154 T:1925896704 ERROR: CAudioDecoder: Unable to Init Codec while loading file musicdb://albums/406/918.mp3?albumid=406
11:03:02.154 T:1925896704 WARNING: PAPlayer::QueueNextFileEx - Failed to create the decoder
11:03:02.154 T:1925896704 DEBUG: OnQueueNextItem: play state was 1, starting 1
11:03:02.154 T:1925896704 DEBUG: OnPlayBackStopped: play state was 1, starting 0
11:03:02.155 T:1925882624 DEBUG: CAnnouncementManager - Announcement: OnStop from xbmc
11:03:02.155 T:1925896704 ERROR: Playlist Player: skipping unplayable item: 3, path [musicdb://albums/406/918.mp3?albumid=406]
11:03:02.155 T:1925896704 DEBUG: Playlist Player: no more playable items… aborting playback
11:03:02.155 T:1925882624 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnStop
11:03:02.184 T:1659372288

Well for them to play you would first need to share them (e.g. via samba) and then either add them to the Library on both devices via the Network Share name or alternatively use path substitution on the second device

I’ve installed samba from the myosmc program addon but not sure if I need to change anything after that as adding the source on second device smb://(ip address of first device)/home/osmc/Music throws up error “file exits” I’ve tried it without a password, with the default osmc password and also the password I made for remote control via http.

When adding the network location i’ve got the shared folder set as home/osmc/Music

I’ve rebooted raspberry pi but still them same error


I think you might have mixed up things with copying your sources and password files. Also it might be best if you use fstab based mounts as you anyhow need to find a way to align both systems (either by using same mounted folder name or via the path substitution)

17 posts were split to a new topic: Phpmyadmin root login not possible

A post was merged into an existing topic: Phpmyadmin root login not possible

2 posts were merged into an existing topic: Phpmyadmin root login not possible

So here we are at the end of 2020. The command
sudo apt-get install mysql-server
no longer seems to work. Any hints for a current command that might work today?

I’m probably not the best source here but I assume you want to install mariadb-server now.

sudo apt update
sudo apt install mariadb-server

Thanks, that worked like a charm. The rest of the guide is still working as described by Kyblik previously.

In the documentation that I found it was recommended to secure your MariaDB installation after first install, like this:

sudo mysql_secure_installation
First prompt will ask you to enter the current database root password. Press Enter to indicate ‘none’. Next prompt will ask if you’d like to set up a database root password. Type N and Enter. From there, press Y + Enter to accept the defaults.

Just thought I’d mention it for prosperity.

Hello all
My pi don’t want to boot. 4 green LED flashing.
I don’t know why (some electrical cut)
So It’s time to reinstall.
But nothing seem to work well with mysql.

sudo apt install mysql-server => don’t work ​anymore so I’ve try mariadb
=> ok

sudo mysql
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

sudo service mysql stop
Failed to stop mysql.service: Unit mysql.service not loaded.

ok, try to find my.cnf => nothing

sudo mysql_secure_installation
sudo: mysql_secure_installation: command not found

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
no file found

please can you update this how to ?
I don’t know how I can repair or reinstall my OSMC

EDIT : I’m a idiot : I have installed the mariadb client !! and loose 2 h… Sorry

Since I have 2 vero 4k’s in my house I have setup a mysql between the two. That way the status of everything is synced (to some extend. It doesn’t do live update since the vero’s are always on).

For some time now I have noticed the recently added is not updating at all. Is this a mysql/osmc issue? Or should I lokk elsewhere?

Hard to say without logs


Which logs would you like? And which debug level?

  1. Open a new thread not to clutter the wiki
  2. As a staring point just upload full logs via MyOSMC and share the URL. If we can not identify the issue from there we can advice in the new thread which debugging helps.

If you are setup such that both clients are pulling from the same database then there is no “syncing”, they are putting/pulling information to/from the same place. The GUI however does not go looking or receive information on when changes happened so when you switch from one client to the next you can be looking at libraries that have not been refreshed yet. If you switch what window your looking at this will sometimes update the screens. If you start playing something when you stop playback that always refreshes the screen. If you have an item that is partially watched and you start playback on a second client it will prompt for the resume correctly even if the client is not currently showing an icon for that. Additionally if your using an OSMC remote you can hold down the select button when your on the home screen and that will force the UI to reload (I programed that option for this specific situation).

I’m a bit confused here. Your saying your syncing watched status (just not “live”) but content is missing from one of the clients (which shouldn’t be possible)? Or are you just talking about just the recently added widget not showing items that were already watched on the other client, which may be expected as that list may actually be a ‘unwatched recently added’ list depending on the skin in use.

Hi, it is the recent item widget that was stuck. Turns out I had a faulty textures13. db and after having solved that the issue resolved.

I am using my LG magic remote and can also program buttons there using the keymap editor.

Just wonder where the “refresh” command is hiding.

This is my “info-button”

<global><keyboard><key id="252">contextmenu</key></keyboard></global>

Disregard, found it global ReloadSkin()

This cannot be done through Keymap Editor. You must edit the map manually and if you use Keymap Editor again after you manually edit the file it will remove it and you must manually tweak the file again.

<?xml version="1.0" encoding="UTF-8"?>
<!-- LG TV CEC KEY ID -->
<!-- up			166 -->
<!-- down		167 -->
<!-- left		169 -->
<!-- right		168 -->
<!-- select/ok	 11 -->
<!-- back		216 -->
<!-- exit		216 -->
<!-- stop		224 -->
<!-- <<			221 -->
<!-- >>			223 -->
<!-- play		234 -->
<!-- pause		230 -->
<!-- red		251 -->
<!-- green		252 -->
<!-- yellow  	253 -->
<!-- blue		254 -->
			<key id="252">ReloadSkin()</key>
			<key id="253">UpdateLibrary(video)</key>