Mysql missing VIEWS
#1
Hi,

I have set up kodi with mysql support on my Arch Linux. The databases are created successfully but for some reason I get errors in my log file that some tables are missing.

I have searched around and found some posts the maybe some views are missing. I had a look and found out that there are no views in my databases.

So whats the problem? Why they are missing?

Mysql server MariaDB "Server version: 10.0.21-MariaDB-log MariaDB Server"
Kodi Version "15.1 Git:Unknown Media Center Kodi"

Am I the only one facing this problem?
Reply
#2
Search button doesn't work?

keyword: mariadb
http://forum.kodi.tv/showthread.php?tid=...ht=mariadb

Long story short - mariadb 10.x is badly broken, avoid it.
Reply
#3
> Am I the only one facing this problem?
Nope, Kodi just doesn't create them.
Reply
#4
Can't you take the database scripts from GitHub and create those views yourself?
Kodi 21.0α | Ubuntu 22.04.3 | Kernel 6.4.x | intel i5-12600K | Gigabyte Z690 Gaming X DDR4 | Corsair 2x8192MB (DDR4-3200) | HDPlex H5v2 | HDPlex 400W HiFi DC-ATX | Pioneer VSX-934 | LG 65B7D
Reply
#5
Anybody who look for a complete dump of Kodi (v17.6) MySQL/MariaDB database, check out here. I have posted DDL scripts for both tables and views.
Reply
#6
I have had the same issue on Windows 10.

I can assume it’s a new issue, as it wasn’t occurring in 18.6 a few weeks when I set up a different machine. It could, I supposed be a result of MySQL going to 8.0.20, but as my old Kodi instance can create a working DB, with views, in my newly set-up machine.

It’s a right, royal pain in the butt, but that is how I got around this... so maybe regress Kodi (to a previous 18.6) to create the DB, then overwrite that with the current install?

(2015-10-11, 14:45)_whoiam_ Wrote: Hi,

I have set up kodi with mysql support on my Arch Linux. The databases are created successfully but for some reason I get errors in my log file that some tables are missing.

I have searched around and found some posts the maybe some views are missing. I had a look and found out that there are no views in my databases.

So whats the problem? Why they are missing?

Mysql server MariaDB "Server version: 10.0.21-MariaDB-log MariaDB Server"
Kodi Version "15.1 Git:Unknown Media Center Kodi"

Am I the only one facing this problem?
Reply
#7
(2020-05-11, 16:26)RapierCT Wrote: It could, I supposed be a result of MySQL going to 8.0.20,

You sure you did the user rights correctly?
sql:
# As per MySQL 8.0 Server and upwards:
GRANT ALL PRIVILEGES ON `MyVideos%.*` TO `kodi`@`%`;
GRANT ALL PRIVILEGES ON `MyMusic%.*` TO `kodi`@`%`;
FLUSH PRIVILEGES;
Reply
#8
(2020-05-11, 16:54)Klojum Wrote:
(2020-05-11, 16:26)RapierCT Wrote: It could, I supposed be a result of MySQL going to 8.0.20,

You sure you did the user rights correctly?
sql:
# As per MySQL 8.0 Server and upwards:
GRANT ALL PRIVILEGES ON `MyVideos%.*` TO `kodi`@`%`;
GRANT ALL PRIVILEGES ON `MyMusic%.*` TO `kodi`@`%`;
FLUSH PRIVILEGES;
Reply
#9
(2020-05-11, 16:54)Klojum Wrote:
(2020-05-11, 16:26)RapierCT Wrote: It could, I supposed be a result of MySQL going to 8.0.20,

You sure you did the user rights correctly?
sql:
# As per MySQL 8.0 Server and upwards:
GRANT ALL PRIVILEGES ON `MyVideos%.*` TO `kodi`@`%`;
GRANT ALL PRIVILEGES ON `MyMusic%.*` TO `kodi`@`%`;
FLUSH PRIVILEGES;
Reply
#10
Photo 
As I say, worked fine with identical setup a few weeks ago ....out-of-the-box MySQL 8, same kodi account added in the same way ...and I can add schemas and table with that account.

Also, it creates tables, and indeed creates the correctly named views AS tables; i.e. I have a tvshowsview being created as a table! So I don’t think a permissions issue is likely tbh

(2020-05-11, 18:28)RapierCT Wrote:
(2020-05-11, 16:54)Klojum Wrote:
(2020-05-11, 16:26)RapierCT Wrote: It could, I supposed be a result of MySQL going to 8.0.20,

You sure you did the user rights correctly?
sql:
# As per MySQL 8.0 Server and upwards:
GRANT ALL PRIVILEGES ON `MyVideos%.*` TO `kodi`@`%`;
GRANT ALL PRIVILEGES ON `MyMusic%.*` TO `kodi`@`%`;
FLUSH PRIVILEGES;
Reply
#11
(2020-05-11, 18:36)RapierCT Wrote: So I don’t think a permissions issue is likely tbh

Better double-check then in the server's user table. Smile

PS: since you are new here, you don't have edit permissions to your posts yet as per certain anti-spam measures.
These restrictions will vanish soon over time.
Reply
#12
(2015-10-11, 15:52)asavah Wrote: Search button doesn't work?

keyword: mariadb
http://forum.kodi.tv/showthread.php?tid=...ht=mariadb

Long story short - mariadb 10.x is badly broken, avoid it.
Been using Mariadb since I started my centralized media server with multiple clients / databases for each one. Have not had a single issue that wasn't my own doing in 4+ years. If anything it's been far more reliable than MySql was. Might be Arch's problem.
Reply
#13
I've used MariaDB on Raspbian and as a LibreELEC add-on. It had its initial quirk (also cache memory related..) but other than that it worked fine for me.
Reply
#14
Try https://forum.kodi.tv/showthread.php?tid...pid2917398

This won't fix the issue with already created databases, only creation from scratch or version upgrade.

To understand better the issue it would be nice to have the folowing:
1) shutdown Kodi
2) backup your db if neeeded
3) drop affected kodi_ databases
4) launch Kodi with debug logging enabled it would show where the hiccup is.
5) look at your server's mysql logfor additional info.

Edit: you may also want this https://forum.kodi.tv/showthread.php?tid...pid2947517 , while unrelated its necessary too.
Reply

Logout Mark Read Team Forum Stats Members Help
Mysql missing VIEWS0