mysql window function working on production server, not on Raspberry Pi - mariadb

I have just setup my Raspberry Pi (RPI) with OSMC (debian 9 stretch), nginx, PHP 7, Mysql and phpmyadmin
All seems to be working except the mysql windows functions. For example the following query produces a syntax error:
SELECT sum(propertyId) over() FROM `properties`;
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '() FROM `properties` LIMIT 0, 25' at line 1
However, the exact same query and database tables works fine on my production server.
Here are the setups (from the respective phpmyadmins) for the two servers:
RASPBERRY PI (not working)
Database server
Server: Localhost via UNIX socket
Server type: MariaDB
Server version: 10.1.26-MariaDB-0+deb9u1 - Debian 9.1
Protocol version: 10
User: phpmyadmin#localhost
Server charset: UTF-8 Unicode (utf8)
Web server
nginx/1.10.3
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
PHP extension: mysqliDocumentation mbstringDocumentation
PHP version: 7.0.30-0+deb9u1
PRODUCTION SERVER (WORKING FINE)
Database server
Server: Localhost via UNIX socket
Server type: MariaDB
Server version: 10.2.12-MariaDB-log - MariaDB Server
Protocol version: 10
User: montegoventures#localhost
Server charset: UTF-8 Unicode (utf8)
Web server
cpsrvd 11.70.0.53
Database client version: libmysql - 5.1.73
PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
PHP version: 5.6.30
I have tried countless times to upgrade the mariadb on the RPI to version 10.2 but no matter what I do, it still installs version 10.1.26
So, any suggestions on how I can get my simple query to work on my RPI server? Yes, I know it is a trivial query, but if I can't get that simple one to work on the RPI, how can I get my complex queries to work?
thanks

Related

Compatibility of Mac MySQL workbench 8.0.31 and MariaDB 10.5 possible?

Every time I go to connect to a remote MariaDB server it just fails and in the logs it says
18:32:43 [ERR][ WBContext]: Unsupported server version: mariadb.org binary distribution 10.5.15-MariaDB-1:10.5.15+maria~focal-log
Is this expected or is something else happening?
I've tried these with some success... I've decided to go with dBeaver for now....when I have more time I'll revisit this.

ERROR 2002 (HY000): Can't connect to server on 'xxx.xxx.XX' (60) (MariaDB 10.8)

Since a day or so I can not access the databases on two of my servers any longer
I use
mysql -h host.sld.TLD -P 3306 -user user
which I have configured to allow my user from my host without password
but get the above error.
However, when I use
telnet host.sld.TLD 3306
I get
5.5.5-10.8.5-MariaDB-1:10.8.5+maria~ubu2004(si4cyW'Y��-n;{ypDA\)VU)mysql_native_passwordC
I am using homebrew's mariadb (currently 10.9.3) on my machine, which I can reach from the outside. One each of the 'failed' remotes is on ubuntu with 10.8 and one on a Mac also with 10.8, and outgoing works from both. OpenSSL is version 1.1.1s on both Macs
I have installed a number of different mariadb versions all have the same issues, as do their perl libraries. mysql itself works.
What am I doing wrong here?
This issue has been fixed in MariaDB 10.9.4 which was released yesterday. Brew still offers 10.9.3, usually it takes a couple of days until latest 10.9 release will be available via brew.
The issue doesn't affect the server itself, but Connector/C and command line tools which link against Connector/C.
See also: MariaDB connector in Python cannot connect to remote server

Airflow 2 - MySQL connection issue

We have a MySQL task that is connecting to a 5.7.22 MySQL DB just fine in Airflow 1.10.15 using SSL (Extra: {"ssl": {"ca": "ca.pem"}} ). However, once we upgraded to Airflow 2.0.2 the task fails with (2026, 'SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol'). Does anyone have any ideas about this behavior?
Below are the python packages for both before and after
Airflow 1.10.15
mysqlclient==1.3.14
Airflow 2.0.2
mysql-connector-python==8.0.22
mysqlclient==2.0.3
I think the problem might be because Airflow 2 uses a newer Debian which does not support TLS v1.
I am not 100% sure how you should configure your MySQL/Client but this sounds awfully similar to MySQL ERROR 2026 - SSL connection error - Ubuntu 20.04
The solution is either to disable SSL (not recommended) or decrease security level of Debian (not recommended) or make sure that you use TLS v2
Apparently this can be done via changing your MySQL seetings and restarting it:
[mysqld]
tls_version=TLSv1.2

Why would a database work on one server, and only partially on another?

Sorry if this is a newbie question. I have been searching and can't seem to figure this out.
I am trying to move a PHP webapp from Plesk, to RunCloud. Both are hosted on a Digital Ocean server.
I exported the database from Plesk, and imported it into RunCloud. After updating the config, it only partially works. Some of the tasks read data, a few seem to write, but a majority just break it.
The strange thing is, if I point the config file to the Plesk server, the app works great using it as a remote database.
Here is from the PHPMyAdmin. The only thing that looks fishy is UNIX, vs TCP. But I cannot find a way to change RunCloud to UNIX.
I would copy the errors, but they are across the board. Any ideas? Thank you so much!
PHPMyAdmin Plesk Server:
Server: Localhost via UNIX socket
Server type: MariaDB
Server connection: SSL is not being used Documentation
Server version: 10.1.48-MariaDB-0ubuntu0.18.04.1 - Ubuntu 18.04
Protocol version: 10
User: prod#localhost
Server charset: UTF-8 Unicode (utf8mb4)
From RunCloud Server:
Server: 127.0.0.1 via TCP/IP
Server type: MariaDB
Server connection: SSL is not being used Documentation
Server version: 10.4.21-MariaDB-1:10.4.21+maria~focal-log - mariadb.org binary distribution
Protocol version: 10
User: prod#localhost
Server charset: UTF-8 Unicode (utf8)
As a newbie, I learned that 10.1 and 10.4 were rather different. I then went through each error to see if I could find the change on the MariaDB update guide (which is great). Somehow, I came across this post: error code 1292 incorrect date value mysql. It was the zero date. I just added the line in my.cnf that it suggested. Fixed!!!

ERROR 2002 (HY000): Can't connect to MySQL server on 'localhost' (10061)

I install a laragon on my windows 10 and using the latest mariadb database
Ver 15.1 Distrib 10.2.12-MariaDB, for Win64 (AMD64)
but when I try to connect using this command
mysql -u root -p
I received this error
ERROR 2002 (HY000): Can't connect to MySQL server on 'localhost' (10061)
What is this error?
I don't know what to do.
When you install MariaDB, by default it creates a database called "mysql".
If you delete that database, that exact error will appears. The solution is either recover that database or reinstall mariadb. I spent one day figuring out why does that error appeared to me.
Conclusion: Don't delete "mysql" database from mariadb.

Resources