Since I’ve run into a wall where Python 2.x can connect to MySQL, while the Python 3.x that I need (to use the statistics packages) can not connect to the MySQL database with the MySQL Connector (as it isn’t there yet on Arm/Debian). Then found that MariaDB (essentially a not-corporate-connected version of MySQL by the same guy who wrote both) has become the default on the newer Debians. So I’m going to give it a go. This means re-installing all that stuff under different names…
This panel pops up in the process of the install, so it looks like there is a “migration” and after that my MySQL stuff may be dead:
─────────────────┤ Configuring mariadb-server-10.0 ├────────────────────┐ │ │ │ MariaDB is a drop-in replacement for MySQL. It will use your current │ │ configuration file (my.cnf) and current databases. │ │ │ │ Note that MariaDB has some enhanced features, which do not exist in │ │ MySQL and thus migration back to MySQL might not always work, at least │ │ not as automatically as migrating from MySQL to MariaDB. │ │ │ │ Really migrate to MariaDB? │ │
So here’s the installation of MariaDB:
root@odroidxu4:/# apt-get install mariadb-server Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libjsoncpp0 libuuid-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed: mariadb-client-10.0 mariadb-client-core-10.0 mariadb-common mariadb-server-10.0 mariadb-server-core-10.0 Suggested packages: mailx mariadb-test tinyca Recommended packages: libhtml-template-perl The following packages will be REMOVED: mysql-client-5.5 mysql-server mysql-server-5.5 mysql-server-core-5.5 The following NEW packages will be installed: mariadb-client-10.0 mariadb-client-core-10.0 mariadb-common mariadb-server mariadb-server-10.0 mariadb-server-core-10.0 0 upgraded, 6 newly installed, 4 to remove and 5 not upgraded. Need to get 9,213 kB of archives. After this operation, 30.4 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://auto.mirror.devuan.org/merged/ jessie-security/main mariadb-common all 10.0.38-0+deb8u1 [17.8 kB] Get:2 http://auto.mirror.devuan.org/merged/ jessie-security/main mariadb-client-core-10.0 armhf 10.0.38-0+deb8u1 [729 kB] Get:3 http://auto.mirror.devuan.org/merged/ jessie-security/main mariadb-client-10.0 armhf 10.0.38-0+deb8u1 [1,034 kB] Get:4 http://auto.mirror.devuan.org/merged/ jessie-security/main mariadb-server-core-10.0 armhf 10.0.38-0+deb8u1 [3,880 kB] Get:5 http://auto.mirror.devuan.org/merged/ jessie-security/main mariadb-server-10.0 armhf 10.0.38-0+deb8u1 [3,534 kB] Get:6 http://auto.mirror.devuan.org/merged/ jessie-security/main mariadb-server all 10.0.38-0+deb8u1 [17.5 kB] Fetched 9,213 kB in 8s (1,024 kB/s) Preconfiguring packages ... (Reading database ... 101223 files and directories currently installed.) Removing mysql-server (5.5.62-0+deb8u1) ... Removing mysql-server-5.5 (5.5.62-0+deb8u1) ... [ ok ] Stopping MySQL database server: mysqld. Removing mysql-client-5.5 (5.5.62-0+deb8u1) ... Removing mysql-server-core-5.5 (5.5.62-0+deb8u1) ... Processing triggers for man-db (126.96.36.199-5) ... Selecting previously unselected package mariadb-common. (Reading database ... 101002 files and directories currently installed.) Preparing to unpack .../mariadb-common_10.0.38-0+deb8u1_all.deb ... Unpacking mariadb-common (10.0.38-0+deb8u1) ... Selecting previously unselected package mariadb-client-core-10.0. Preparing to unpack .../mariadb-client-core-10.0_10.0.38-0+deb8u1_armhf.deb ... Unpacking mariadb-client-core-10.0 (10.0.38-0+deb8u1) ... Selecting previously unselected package mariadb-client-10.0. Preparing to unpack .../mariadb-client-10.0_10.0.38-0+deb8u1_armhf.deb ... Unpacking mariadb-client-10.0 (10.0.38-0+deb8u1) ... Selecting previously unselected package mariadb-server-core-10.0. Preparing to unpack .../mariadb-server-core-10.0_10.0.38-0+deb8u1_armhf.deb ... Unpacking mariadb-server-core-10.0 (10.0.38-0+deb8u1) ... Processing triggers for man-db (188.8.131.52-5) ... Setting up mariadb-common (10.0.38-0+deb8u1) ... Selecting previously unselected package mariadb-server-10.0. (Reading database ... 101134 files and directories currently installed.) Preparing to unpack .../mariadb-server-10.0_10.0.38-0+deb8u1_armhf.deb ... Unpacking mariadb-server-10.0 (10.0.38-0+deb8u1) ... Selecting previously unselected package mariadb-server. Preparing to unpack .../mariadb-server_10.0.38-0+deb8u1_all.deb ... Unpacking mariadb-server (10.0.38-0+deb8u1) ... Processing triggers for man-db (184.108.40.206-5) ... Processing triggers for systemd (215-17+deb8u7) ... Setting up mariadb-client-core-10.0 (10.0.38-0+deb8u1) ... Setting up mariadb-client-10.0 (10.0.38-0+deb8u1) ... Setting up mariadb-server-core-10.0 (10.0.38-0+deb8u1) ... Setting up mariadb-server-10.0 (10.0.38-0+deb8u1) ... Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ... Installing new version of config file /etc/init.d/mysql ... Installing new version of config file /etc/logrotate.d/mysql-server ... Installing new version of config file /etc/mysql/conf.d/mysqld_safe_syslog.cnf ... Installing new version of config file /etc/mysql/debian-start ... 190219 12:42:41 [Note] /usr/sbin/mysqld (mysqld 10.0.38-MariaDB-0+deb8u1) starting as process 7509 ... [ ok ] Starting MariaDB database server: mysqld. Setting up mariadb-server (10.0.38-0+deb8u1) ... Processing triggers for systemd (215-17+deb8u7) ...
So I guess I’ll find out if I’ve broken things, or made them better ;-)
A Bit Later
I’ve launched an “idle” session and re-run one of my Python programs and it did make a graph, so at a minimum I’ve not broken things ;-)
Next I’ll get to figure out how to tell if I’m actually running MariaDB or not…
Rerunning the B&W global map (that has a version check in it)
try: db=MySQLdb.connect("localhost","root","OpenUp!",'temps') cursor=db.cursor() cursor.execute('SELECT VERSION()') data=cursor.fetchone() print "Version %s" % data
>>> ================================ RESTART ================================ >>> Version 10.0.38-MariaDB-0+deb8u1
So it looks like that’s all it takes to move to MariaDB. It’s a “drop in replacement”, but with a hard time rolling back.
Next I’m going to try some of the “missing bits” in MySQL and see if they are working in MariaDB. That will take a while, so after lunch some time. That will be done as an update here.