v18 Ubuntu 20.04 MySQL client issue
#1
hello
I've installed Ubuntu 20.04 on my PC, in teh past I had a working setup with ubuntu 18.04 and shared library on my NAS with Mysql.
from what I can see in the log is a bad handshaking issue between my laptop and my nas due to a different MySQL version 8 for ubuntu 20.04 and 5.1 on my NAS (WD which I cannot upgrade). using mariadb-client I'm able to connect via terminal to my NAS avoiding the bad handshake issue. can I force kodi to use mariadb-client as well? It looks like kodi 18.6 wants to use libmysqlclient21 which I think it's based on mysql 8.

thank you very much for your help
A
Reply
#2
Ubuntu 20.04's default MySQL database is 8.0.something, and v8.0 does have some new quirks.
I kept it easy for myself, and installed MariaDB 10.3.x instead. I'll dive into MySQL 8 later.
Alternatively, MySQL 5.7 will be a useful version as well.

You could provide Kodi's log file so we can see some details. A 'handshake' in MySQL doesn't tell me that much.
Reply
#3
(2020-04-26, 19:50)Klojum Wrote: Ubuntu 20.04's default MySQL database is 8.0.something, and v8.0 does have some new quirks.
I kept it easy for myself, and installed MariaDB 10.3.x instead. I'll dive into MySQL 8 later.
Alternatively, MySQL 5.7 will be a useful version as well.

You could provide Kodi's log file so we can see some details. A 'handshake' in MySQL doesn't tell me that much.
sure here you can find the log file:
https://paste.kodi.tv/uhujudulaf.kodi
Reply
#4
AFAIK it's a mysql bug which has not and it looks like will not be solved, libmysql from 8.0.11 or higher seems to have problems connecting to older mysql servers < 5.7 (5.7 is not affected).
https://bugs.mysql.com/bug.php?id=90994
Reply
#5
I'm also experiencing an issue with Kodi 18.6 Leia and mysql 8, it appears after upgrading mysql on ubuntu 20.04 all my "in progress" TV shows aren't displaying.
Reply
#6
(2020-05-06, 13:44)MonkeyCoder Wrote: I'm also experiencing an issue with Kodi 18.6 Leia and mysql 8

Well, are you gonna share with us what exactly the issue is?
And perhaps share a debug log (wiki) that suports the problem?

(2020-05-06, 13:44)MonkeyCoder Wrote: all my "in progress" TV shows aren't displaying.

Not displaying, where!?
Reply
#7
(2020-05-06, 14:15)Klojum Wrote:
(2020-05-06, 13:44)MonkeyCoder Wrote: I'm also experiencing an issue with Kodi 18.6 Leia and mysql 8

Well, are you gonna share with us what exactly the issue is?
And perhaps share a debug log (wiki) that suports the problem?
(2020-05-06, 13:44)MonkeyCoder Wrote: all my "in progress" TV shows aren't displaying.

Not displaying, where!? 
As far as I can tell, everything else seems to work apart from "In progress" tv shows, and this is the same for both profiles I have that are using mysql.  In progress movies seem fine btw.  Basically I use to have in progress tv shows at the top of the default skin, this no longer shows up and if I select "in progress" from the tool bar (with genres, tags etc), it won't display anything either.

I tried enabling the debug logging in the settings but couldn't see anything in the logs though the UI, I guess I maybe need to transfer a file off or something, I'll have another look later (thanks for the link btw).  I'm on a nvidia shield so access to the box never seems quite as straight forward as using another device with ssh.
Reply
#8
Have you looked at the MySQL log for any oddities?
Reply
#9
(2020-05-07, 10:59)Klojum Wrote: Have you looked at the MySQL log for any oddities?

Thanks, I don't know why I didn't think of that, doh!

The only message I can see is "Out of sort memory, consider increasing server sort buffer size!", I'll look into that and report back.

Cheers
Reply
#10
(2020-05-07, 12:00)MonkeyCoder Wrote:
(2020-05-07, 10:59)Klojum Wrote: Have you looked at the MySQL log for any oddities?

Thanks, I don't know why I didn't think of that, doh!

The only message I can see is "Out of sort memory, consider increasing server sort buffer size!", I'll look into that and report back.

Cheers 
Thanks for all your help, increasing the buffer size to 1M seems to have resolved the issue, I first tried 128K but that didn't work, I haven't tried 256K and 512K, I may try these as some point as from what I've read the lower the buffer size the better the performance?

For anyone with similar issues, I'm on Ubuntu 20.04 and edited /etc/mysql/mysql.conf.d/mysqld.cnf and add the following lines at the bottom:

sort_buffer_size = 1M

Then restart mysql:

systemctl restart mysql
Reply
#11
(2020-05-07, 15:41)MonkeyCoder Wrote: For anyone with similar issues, I'm on Ubuntu 20.04 and edited /etc/mysql/mysql.conf.d/mysqld.cnf and add the following lines at the bottom:

Thanks for posting your solution. I ran into this and your post saved me a log of debugging.
Reply
#12
(2020-04-27, 19:06)asavah Wrote: AFAIK it's a mysql bug which has not and it looks like will not be solved, libmysql from 8.0.11 or higher seems to have problems connecting to older mysql servers < 5.7 (5.7 is not affected).
https://bugs.mysql.com/bug.php?id=90994

thank you very much. yes at the end I've moved the database on my raspberry and I can see it from ubuntu 20.04

best
Andrea
Reply
#13
(2020-05-07, 15:41)MonkeyCoder Wrote:
(2020-05-07, 12:00)MonkeyCoder Wrote:
(2020-05-07, 10:59)Klojum Wrote: Have you looked at the MySQL log for any oddities?

Thanks, I don't know why I didn't think of that, doh!

The only message I can see is "Out of sort memory, consider increasing server sort buffer size!", I'll look into that and report back.

Cheers 
Thanks for all your help, increasing the buffer size to 1M seems to have resolved the issue, I first tried 128K but that didn't work, I haven't tried 256K and 512K, I may try these as some point as from what I've read the lower the buffer size the better the performance?

For anyone with similar issues, I'm on Ubuntu 20.04 and edited /etc/mysql/mysql.conf.d/mysqld.cnf and add the following lines at the bottom:

sort_buffer_size = 1M

Then restart mysql:

systemctl restart mysql

Thank you! 512K works.
Reply
#14
Just to add to this... I've been going quietly blue in the face trying to solve the same problem on my system. I was getting the same SQL: Missing result set!/GetMoviesByWhere failed errors for both Recently Added movies and Sets.

It seems that mysqld is somewhat... flexible about which config files it uses: from one post I read, it seems that there are over 40 different potential locations. Different systems will, therefore, reference different config files - edit the wrong one, and you'll be there all week waiting for the new variables to make any difference. So, YMMV when it comes to whether or not mysqld.cnf will work.

To check what configs are being used

$ mysqld --verbose --help | more

This will return pages of output, hence the more (you could also use head, of course). The files being read, and their order, are listed under "Default options are read from the following files in the given order". Cunning title, that.

Code:
mysqld  Ver 8.0.27-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
Copyright © 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Starts the MySQL database server.

Usage: mysqld [OPTIONS]

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf 

Then edit one of these. Make sure you're editing a global file (e.g. /etc/my.cnf) or one that applies to the relevant user as whom the daemon is running - there's no point in editing your personal config if you're running the daemon as root, after all.

Add the sort_buffer_size declaration to the [mysqld] section and restart, as above. I've gone for 1MB (sort_buffer_size=1M) and put that into the existing [mysqld] section of /etc/my.cnf.

To check if the parameter will take effect

$ mysqld --verbose --help | grep sort-buffer-size

This is effectively the same command as above, we're just looking for a different bit of the output. In essence, this simply reads the defined list of config files, and returns all the configuration values that will be used when mysqld runs. We're only interested in one, hence the grep.

Code:
  --innodb-sort-buffer-size=# 
  --myisam-sort-buffer-size=# 
  --sort-buffer-size=# 
innodb-sort-buffer-size                                      1048576
myisam-sort-buffer-size                                      8388608
sort-buffer-size                                             1048576

... you can see the 1048576 bytes I set (1MB = 1024 * 1024 bytes), versus the default of 262144 bytes (256k).

If it looks good, restart the daemon/service.

To check if the parameter has taken effect

$ mysql -u root -p

Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 190
Server version: 8.0.27-0ubuntu0.20.04.1 (Ubuntu)

Copyright © 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW VARIABLES where Variable_name = "sort_buffer_size";
+------------------+---------+
| Variable_name    | Value   |
+------------------+---------+
| sort_buffer_size | 1048576 |
+------------------+---------+
1 row in set (0.00 sec)

Now restart Kodi. All is good.
Search | Banned addons (wiki) | Forum rules (wiki) | First time user (wiki) | FAQs (wiki) | Troubleshooting (wiki) | Add-ons (wiki) | Free content (wiki) | Debug log (wiki)Free Content
Reply
#15
(2021-11-23, 14:33)Prof Yaffle Wrote: It seems that mysqld is somewhat... flexible about which config files it uses: from one post I read, it seems that there are over 40 different potential locations.

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf [/syntax]

Then edit one of these...
I'm just gonna piss on your chips here - which, given you've written a damned good guide, seriously does NOT deserve it - but to clarify a few points here:
  • mysqld.cnf is the SERVER config file - it contains config settings affecting the MySQL daemon.  So, if you want to change the cache size, this is the one you'd look for
  • my.cnf is the CLIENT config file. Add one to your home directory to change your mysql prompt, set the default database to connect to, passwords, etc.
Instead of everyone adding duplicate entries into their .my.cnf file in their home directory, the platform admin can put common settings in /etc/my.cnf (system-wide client config settings) - these are read in first then "overridden" by the one in your home directory.

However, whenever there's a package upgrade, changes made to /etc/my.cnf may be lost.  A (fairly) recent innovation is to leave /etc/my.cnf alone and instead add server-wide changes as small files in /etc/mysql/conf.d/ (or similar) so they're outside the change impact zone.  Hence, the order is:
  1. default server-wide package-provided config file
  2. server-wide sysadmin customisations dropped into the .d/ directory
  3. local config file in the home directory
So - if you're connecting to a remote MySQL server, it's my.cnf files you want. If it's server changes, it's mysqld.cnf you need.  If the service is running locally, you'll need both.

But yeah... it's a myriad of different files in too many locations if you don't know what to look for.
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu 20.04 MySQL client issue0