Closed ksooo closed 1 year ago
I now built LE incl the maridb add-on myself and grepped mariadb-upgrade and mariadb-check binaries from the build, copied them over to my LE box:
TV-Server:~/.kodi/addons/service.mariadb/bin # ls -la
total 55116
drwxr-xr-x 2 root root 4096 Mar 27 08:22 .
drwxr-xr-x 8 root root 4096 Mar 25 12:11 ..
lrwxrwxrwx 1 root root 5 Mar 27 08:22 mariadb -> mysql
-rwxr-xr-x 1 root root 4978640 Mar 27 00:04 mariadb-check
-rwxr-xr-x 1 root root 5058288 Mar 27 08:21 mariadb-upgrade
-rwxr-xr-x 1 root root 1854 Mar 25 12:11 mariadb.start
-rwxr-xr-x 1 root root 149 Mar 25 12:11 mariadb.stop
-rwxr-xr-x 1 root root 22252272 Mar 25 12:11 mariadbd
-rwxr-xr-x 1 root root 4474240 Mar 25 12:11 my_print_defaults
-rwxr-xr-x 1 root root 5427056 Mar 25 12:11 mysql
-rwxr-xr-x 1 root root 22495 Mar 25 12:11 mysql_install_db
-rwxr-xr-x 1 root root 13699 Mar 25 12:11 mysql_secure_installation
-rwxr-xr-x 1 root root 4813984 Mar 25 12:11 mysqladmin
-rwxr-xr-x 1 root root 4890464 Mar 25 12:11 mysqldump
-rwxr-xr-x 1 root root 4473920 Mar 25 12:11 resolveip
Please note the symlink mariadb -> mysql. mariadb-upgrade
calls mariadb
.
Running `mariadb-upgrade then fixed the problem! No more MySQL errors in kodi.log on Kodi startup.
TV-Server:~/.kodi/addons/service.mariadb/bin # ln -s mysql mariadb
TV-Server:~/.kodi/addons/service.mariadb/bin # ./mariadb-upgrade -u kodi -p
Enter password:
Major version upgrade detected from 10.4.17-MariaDB to 10.11.2-MariaDB. Check required!
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.roles_mapping OK
mysql.servers OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
MyMusic82.albumartistview OK
MyMusic82.albumview OK
MyMusic82.artistview OK
MyMusic82.songartistview OK
MyMusic82.songview OK
MyVideos119.episode_view OK
MyVideos119.movie_view OK
MyVideos119.musicvideo_view OK
MyVideos119.season_view OK
MyVideos119.tvshow_view OK
MyVideos119.tvshowcounts OK
MyVideos119.tvshowlinkpath_minview OK
MyVideos121.episode_view OK
MyVideos121.movie_view OK
MyVideos121.musicvideo_view OK
MyVideos121.season_view OK
MyVideos121.tvshow_view OK
MyVideos121.tvshowcounts OK
MyVideos121.tvshowlinkpath_minview OK
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
Processing databases
MyMusic82
MyMusic82.album OK
MyMusic82.album_artist OK
MyMusic82.album_source OK
MyMusic82.art OK
MyMusic82.artist OK
MyMusic82.audiobook OK
MyMusic82.discography OK
MyMusic82.genre OK
MyMusic82.infosetting OK
MyMusic82.path OK
MyMusic82.removed_link OK
MyMusic82.role OK
MyMusic82.song OK
MyMusic82.song_artist OK
MyMusic82.song_genre OK
MyMusic82.source OK
MyMusic82.source_path OK
MyMusic82.version OK
MyMusic82.versiontagscan OK
MyVideos119
MyVideos119.actor OK
MyVideos119.actor_link OK
MyVideos119.art OK
MyVideos119.bookmark OK
MyVideos119.country OK
MyVideos119.country_link OK
MyVideos119.director_link OK
MyVideos119.episode OK
MyVideos119.files OK
MyVideos119.genre OK
MyVideos119.genre_link OK
MyVideos119.movie OK
MyVideos119.movielinktvshow OK
MyVideos119.musicvideo OK
MyVideos119.path OK
MyVideos119.rating OK
MyVideos119.seasons OK
MyVideos119.sets OK
MyVideos119.settings OK
MyVideos119.stacktimes OK
MyVideos119.streamdetails OK
MyVideos119.studio OK
MyVideos119.studio_link OK
MyVideos119.tag OK
MyVideos119.tag_link OK
MyVideos119.tvshow OK
MyVideos119.tvshowlinkpath OK
MyVideos119.uniqueid OK
MyVideos119.version OK
MyVideos119.writer_link OK
MyVideos121
MyVideos121.actor OK
MyVideos121.actor_link OK
MyVideos121.art OK
MyVideos121.bookmark OK
MyVideos121.country OK
MyVideos121.country_link OK
MyVideos121.director_link OK
MyVideos121.episode OK
MyVideos121.files OK
MyVideos121.genre OK
MyVideos121.genre_link OK
MyVideos121.movie OK
MyVideos121.movielinktvshow OK
MyVideos121.musicvideo OK
MyVideos121.path OK
MyVideos121.rating OK
MyVideos121.seasons OK
MyVideos121.sets OK
MyVideos121.settings OK
MyVideos121.stacktimes OK
MyVideos121.streamdetails OK
MyVideos121.studio OK
MyVideos121.studio_link OK
MyVideos121.tag OK
MyVideos121.tag_link OK
MyVideos121.tvshow OK
MyVideos121.tvshowlinkpath OK
MyVideos121.uniqueid OK
MyVideos121.version OK
MyVideos121.writer_link OK
information_schema
performance_schema
sys
sys.sys_config OK
test
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
I see mariadb-10.4.17 is old and should probably be bumped too. The question is to which version? 10.4.28 or 10.11.2?
If I read the output from mariadb-upgrade correctly, LE11 comes with 10.11.2
True. I was looking your patch above where is some old version.
So only mysql_upgrade and mysqlcheck is missing in addon? Then I will send PR.
And we need a symlink! Read what I wrote. ;-)
We seem to rename the binaries from mariadb to mysql when packaging. But mariadb-upgrade seems to have a hardcoded call to „mariadb“ binary!
PR send. Did test with commands mariadb-upgrade
and mariadb-check
.
Describe the bug
I just updated from LE 9 to 11. I'm using mariadb add-on to host shared database for several Kodi clients. Since the update I have the following errors in Kodi log, everytime Kodi starts.
To Reproduce
Steps to reproduce the behavior:
Informations
Log file
Additional context
Root cause is the updated mariadb version in LE 11, which causes some incompatibilities. AFAIK, fix would be easy, just run 'mysql_upgrade' once, but this tool is not provided with the mariadb add-on.
This also happened after a former update and I have a (nowadays no longer applying) Patch laying around, which used back in the days to solve the problem:
Note: mysql_upgrade calls mysqlcheck, so we need both tools.