Downgrade MariaDB data to earlier version - mariadb

I recently went from 10.0.21 to 10.1.8 MariaDB. All testing went well but there were some minor pieces that were over looked. So I need to downgrade/migrate data from MariaDB 10.1.8 to 10.0.21. I was thinking I could migrate the data to a fresh install of 10.0.21 but was wondering if MariaDB inserted some extra stuff during a version upgrade.
Is there a true method to Grab the data from an upgraded version of MariaDB and move it to a lower version of MariaDB?

You can use mysqldump to dump the database from the higher and import it into the lower MariaDB version. This works as it uses SQL statements.
Usage and examples: https://mariadb.com/kb/en/mariadb/mysqldump/
Backup and Restore Overview ("data can be restored on other […] MariaDB versions"): https://mariadb.com/kb/en/mariadb/backup-and-restore-overview/

You can see the installed version with
dpkg -l |grep mariadb-server-10|grep ii|xargs|cut -d" " -f3
I have 1:10.3.31-0+deb10u1 installed. To Install an older version replace the number and install with
apt install mariadb-server-10.3=1:10.3.25-0+deb10u1 mariadb-server-core-10.3=1:10.3.25-0+deb10u1
You should set the version on hold afterwards with
apt-mark hold mariadb-server-core-10.3 mariadb-server-10.3 mariadb-client-10.3 mariadb-client-core-10.3 mariadb-common
Note: Here I run mariadb-common in the installed version 10.3.31 and -server in 10.3.25, which works fine

Related

Unable to see snowflake conn_type in Airflow

I can see the following in my pip list but when I try to add a Snowflake connection via the GUI, Snowflake is not an option from the dropdown.
apache-airflow-providers-snowflake 2.1.0
snowflake-connector-python 2.5.1
snowflake-sqlalchemy 1.2.3
Am I missing something?
I have had this issue with MWAA recently.
I find that if I select AWS in the drop down and provide the correct snowflake host name etc it works though.
I run into the same issue using the official helm chart 1.3.0.
But finally I was able to make Snowflake connection visible by doing the following steps:
I uninstalled the apache-airflow-providers-google. Not sure whether this is important, but I like to mention it here. I did this, because I got some warnings.
Because with SQLAlchemy 1.4 some breaking changes were introduced, I made sure that version 1.3.24 gets installed. Based on that I choosed the fitting version for snowflake stuff.
So this is my requirements.txt for my custom Airflow container:
apache-airflow-providers-snowflake==2.3.0
pyarrow==5.0.0
snowflake-connector-python==2.5.1
snowflake-sqlalchemy==1.2.5
SQLAlchemy==1.3.24
This is my Dockerfile:
FROM apache/airflow:2.2.1-python3.8
## adding missing python packages
USER airflow
COPY requirements.txt .
RUN pip uninstall apache-airflow-providers-google -y \
&& pip install -r requirements.txt
I had the same issue where my pip freeze showed the apache-airflow-providers-snowflake yet I did not have the provider in the UI. I had to add the line apache-airflow-providers-snowflake to my requirements.txt file and then restart. Then I was able to see the Snowflake provider and connector in the UI.

Difference in MariaDB installation packages on RHEL server?

On trying to install MySql on RHEL7 I came to know that we need to use MariaDB instead.
I tried the installation on my machine which is RHEL6 by adding MariaDB.repo file to /etc/yum.repos.d/ with following lines -
[mariadb]
name = MariaDB-5.5.39
baseurl=https://downloads.mariadb.com/files/MariaDB/mariadb-5.5.39/yum/rhel6-amd64/
# alternative: baseurl=http://archive.mariadb.org/mariadb-5.5.39/yum/rhel6-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
https://mariadb.com/kb/en/mariadb/yum/
Thereafter I installed it successfully using following command -
sudo yum install MariaDB-server MariaDB-client
Now on an RHEL7 production box same steps failed with following conflict -
file /etc/my.cnf from install of MariaDB-common-5.5.39-1.el6.x86_64 conflicts with file from package maria-libs-1:5.5.44-2.el7.x86_64
So I understand I am pointing to rhel6 repo on rhel7 and probably some pre-installed files are in conflict.
But when I execute below mysql/mariadb gets installed successfully, what difference does case make here?
sudo yum install mariadb mariadb-server
I am not sure if it is linked to a different repository in background, I dont have access to the instance to dig further in repo settings, can anyone help me out here?
You can clarify that using yum search mariaDB
I executed that an ended up with same result as mariaDB and mariadb
============================= N/S matched: mariaDB =============================
mariadb-bench.x86_64 : MariaDB benchmark scripts and data
mariadb-devel.i686 : Files for development of MariaDB/MySQL applications
mariadb-devel.x86_64 : Files for development of MariaDB/MySQL applications
mariadb-libs.i686 : The shared libraries required for MariaDB/MySQL clients
mariadb-libs.x86_64 : The shared libraries required for MariaDB/MySQL clients
mariadb-server.x86_64 : The MariaDB server and related files
mariadb.x86_64 : A community developed branch of MySQL
mariadb-test.x86_64 : The test suite distributed with MariaD
Name and summary matches only, use "search all" for everything.

rdf_loader_run stuck and Virtuoso server doesn't respond to queries

I've run these commands:
ld_add('/path/datasets/dbpedia/2015-04/dbpedia_2015-04.owl', 'http://dbpedia.org/resource/classes#');
rdf_loader_run();
ld_dir_all('/path/datasets/dbpedia/2015-04/importedGraphs/dbpedia.org', '*.*', 'http://dbpedia.org');
That all ran successfully, but then I ran:
rdf_loader_run();
It's been 48 hours on a CoreI7 machine with 24GB ram, Virtuoso server is not using any CPU, and it doesn't respond to queries such as:
select * from DB.DBA.LOAD_LIST;
...in another instances of isql-vt. The size of files in /var/lib/virtuoso-opensource-6.1/db/ are not increasing.
The problem was I was using an old version of virtuoso, by upgrading to 7.2 as suggested in comments it solved. I didn't have this problem on my macbook, so seems that while homebrew installs latest version by default, apt-get doesn't do so in Ubuntu and you need to install the latest version.

How does one upgrade Riak, if it was initially downloaded from source?

Riak has great documentation on how to upgrade Riak if it was initially installed via a package ( http://docs.basho.com/riak/1.2.1/cookbooks/Rolling-Upgrades/ ). But how do you upgrade Riak if you originally downloaded/installed it from source?
The current version of Riak I'm using is 1.0.
It's pretty much the same except in step 3 instead of
sudo dpkg -i <riak_package_name>.deb
you just download the tarball with new version and install it as you did first time.
But frankly speaking in 99% cases it's easier to do it via packages. I believe you can upgrade to packaged version from manually installed one by following their rolling update instructions precisely.

unable to update sqlite3 on mac osx?

i want to install newest sqlite3 on my mac osx. i am trying this from last 6 hours but still not succeed.Here are the steps i have followed.I have tried this site
mkdir ~/src
cd ~/src
curl http://www.sqlite.org/sqlite-3.6.18.tar.gz | tar zx
cd sqlite-3.6.18
autoconf
./configure --prefix=/usr/local
make
sudo make install
//check what version of SQLite is installed
sqlite3 --version
3.6.18
which sqlite3
/usr/local/bin/sqlite3
but it fails
but i manually downloaded the sqlite3 from the address below
http://www.sqlite.org/sqlite-amalgamation-3.6.22.tar.gz
and then tried the above scriot
the description of the above link is
A tarball containing the amalgamation together with an configure script and makefile for building it. This is the recommended source distribution for all Unix and Unix-like platforms.
and i have also downloaded the
Precompiled Binaries For Mac OS X
sqlite3-3.6.22-osx-x86.zip
A command-line program for accessing and modifying SQLite version 3.* databases. For x86 Macs running Leopard (OS 10.5) only.
but still i am unable to install.I have also read that modifying the default sqlite3 will cause some application stopped working because apple has a modified version of sqlite.
does some one knows how do i install the new sqlite3 and use that without removing the default one.I am not familiar with terminal commands.
ok here is an update
i have installed the sqlite in a new folder in /users/admin/sqlite3new
but when i run sqlite3 from terminal it shows older version...
also if i directly executes the bin file i am unable to open database is there any other way to open database?
Thanks
Macports ships a version of sqlite3 that will probably work perfectly fine (and it installs your dependencies automagically). Maybe that's an option for you?
Macports by default installs software in /opt so it will not remove the 'default' sqlite.

Resources