Drop-in of MariaDB triggers removal of needed packages depending mysql-common - mysql

In Ubuntu (Actually Kubuntu) 15.10 (Wily) attempting to install MariaDB 10.1 all instructions say to first remove mysql-client and mysql-common packages via sudo apt-get remove mysql-server mysql-client mysql-common and passing the -s flag (sudo apt-get -s remove mysql-server mysql-client mysql-common) shows that to remove mysql-common will also result in several other packages being removed that one would not want gone...
The following packages were automatically installed and are no longer required:
libarmadillo5 libctemplate2v5 libdap17v5 libdapclient6v5 libdbi-perl libepsilon1 libfreexl1 libgeos-3.5.0 libgeos-c1v5 libhdf4-0-alt libkmlbase1 libkmldom1 libkmlengine1 liblwgeom-2.1.8 libminizip1
libnetcdf7 libodbc1 libogdi3.2 libopenjp2-7 libpq5 libproj9 libspatialite7 libsuperlu4 libterm-readkey-perl liburiparser1 libvsqlitepp3v5 mysql-utilities mysql-workbench-data odbcinst
odbcinst1debian2 proj-bin proj-data python-ecdsa python-mysql.connector python-paramiko python-pexpect python-pyodbc
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
accountwizard* akonadi-backend-mysql* akonadi-server* akregator* amarok* amarok-utils* kaddressbook* kdepim-runtime* kmail* knotes* kontact* korganizer* libdbd-mysql-perl* libgdal1i*
libmysqlclient18* libmysqlcppconn7v5* libqt4-sql-mysql* libqt5sql5-mysql* mysql-client* mysql-client-5.6* mysql-common* mysql-workbench*
So as you can see, things like kaddressbook, knotes, mysql-workbench, etc. I don't know if I should just leave mysql-common and install mariadb-common alongside it or if there are any other options to perform the drop-in replacement without removing all that depends on mysql-common.
edit: I did apt-cache policy mysql-common which showed:
mysql-common:
Installed: 5.6.28-0ubuntu0.15.10.1
Candidate: 10.1.13+maria-1~wily
Version table:
10.1.13+maria-1~wily 0
500 http://mirror.jmu.edu/pub/mariadb/repo/10.1/ubuntu/ wily/main amd64 Packages
*** 5.6.28-0ubuntu0.15.10.1 0
500 http://us.archive.ubuntu.com/ubuntu/ wily-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ wily-security/main amd64 Packages
100 /var/lib/dpkg/status
5.6.25-0ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
So then I tried sudo apt-get update which I hoped would replace mysql-common with mariadb-common but it didn't.

The answer is to remove mysql-client and mysql-server (If installed), leaving mysql-common and then doing apt-get update and apt-get upgrade so long as apt-cache policy mysql-common shows an upgrade to mariadb-common. After that you can install mariadb-server as usual with no unintended consequences.

Related

I want to install mysql8.0 on ubuntu18.10, but apt keeps trying to install mysql5.7, why?

Here are the steps of my installation:
sudo wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
In the Configuration GUI, choose mysql 8.0, and enter OK to exit GUI
sudo apt-get install mysql-server
Then I got some messages:
The following additional packages will be installed:
libaio1 libevent-core-2.1-6 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7
mysql-server-core-5.7
Suggested packages:
mailx tinyca
Recommended packages:
libhtml-template-perl
The following NEW packages will be installed:
libaio1 libevent-core-2.1-6 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server
mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20.6 MB of archives.
After this operation, 159 MB of additional disk space will be used.
Do you want to continue? [Y/n]
if I enter Y, apt will install mysql5.7, not the version of 8.0, just as the message said.How can I install the expected version?
The problem was resolved by install an older version of mysql8:
mysql-server_8.0.13
Here is the entry of download page: Archives

libpython3.6-dev, libpython3.6 and mysqlclient not installing on ubuntu 18.04

I tried installing mysql client using pip install mysqlclient but ended up as
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
So I tried installing packages that could detect header file Python.h
For that I tried sudo apt-get install python3.6-dev
But that resulted into
The following packages have unmet dependencies:
python3.6-dev : Depends: python3.6 (= 3.6.6-1~18.04) but 3.6.6-1+xenial1 is to be installed
Depends: libpython3.6-dev (= 3.6.6-1~18.04) but it is not going to be installed
Depends: libpython3.6 (= 3.6.6-1~18.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
How to deal with this situation and where the problem lies?
It seems you are having dependency issue. Install libpython3.6-dev then python3.6-dev and mysql. After that I hope you will be able to install mysqlclient.
sudo apt install libpython3.6-dev
sudo apt install python3.6-dev
sudo apt instal mysql-server
Then you will be able to install mysqlclient.
**if this does not happen it's good to uninstall and reinstall the python3.6 because many people got solution in this way. You can can see here
You may use following commands to do that and repeat those above commands.
sudo apt purge libpython3*
sudo apt-get purge python3.6
sudo apt-get autoremove && sudo apt-get autoclean
sudo apt-get install python3.6*
Hope it will sove your problem.

facing error while nstalling mysql in ubuntu

im trying to install mysql-community-server_5.7.13-1ubuntu16.04_amd64.deb.
before that i have ran the commands
sudo apt-get remove --purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
after that im facing the below error. cn anyone provide me the solution.
testuser#mon-mod:/usr/mysql$ sudo dpkg -i mysql-community-server_5.7.13-1ubuntu16.04_amd64.deb
(Reading database ... 63795 files and directories currently installed.)
Preparing to unpack mysql-community-server_5.7.13-1ubuntu16.04_amd64.deb ...
.
Unpacking mysql-community-server (5.7.13-1ubuntu16.04) over (5.7.13-1ubuntu16.04) ...
dpkg: dependency problems prevent configuration of mysql-community-server:
mysql-community-server depends on mysql-common (= 5.7.13-1ubuntu16.04); however:
Package mysql-common is not installed.
mysql-community-server depends on mysql-client (= 5.7.13-1ubuntu16.04); however:
Package mysql-client is not installed.
mysql-community-server depends on libmecab2 (>= 0.996-1.2ubuntu1); however:
Package libmecab2 is not installed.
mysql-community-server depends on libstdc++6 (>= 5.2); however:
Version of libstdc++6:amd64 on system is 4.8.4-2ubuntu1~14.04.1.
mysql-community-server depends on init-system-helpers (>= 1.18~); however:
Version of init-system-helpers on system is 1.14.
dpkg: error processing package mysql-community-server (--install):
dependency problems - leaving unconfigured
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
mysql-community-server
testuser#mon-mod:/usr/mysql$
you can use apt-get package manager in the Ubuntu to install MySQL server. It will take care of the dependencies. In Ubuntu you can use
sudo apt-get install mysql-server
or
sudo apt-get install mysql-server-5.7

mysql2 gem install fails with unmet dependencies: libmysqlclient-dev

I am experiencing a similar issue to this poster on the askubuntu forums. I've started with a clean Ubuntu 14.04 install several times now and keep getting the same error no matter what I do.
The following packages have unmet dependencies:
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.46-0ubuntu0.14.04.2) but 10.0.23+maria-1~trusty is to be installed
E: Unable to correct problems, you have held broken packages.
Reproducing the error:
Followed the instructions on the MariaDB site for version 10.0. I tried 10.1 as well in a previous attempt.
I have Ruby (2.2.3) on Rails (4.2.5) installed on my server. Setup my app, configure the Gemfile and bundle install
An error occurred while installing mysql2 (0.4.2), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.4.2'` succeeds before bundling.
Then I gem install mysql2 -v '0.4.2' and get the following:
mysql client is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install mysql-devel', and try again.
So I apt-get install libmysqlclient-dev and get the error Unable to correct problems, you have held broken packages as seen in the first part of this post.
Infos:
apt-cache policy libmysqlclient18 &
libmysqlclient18:
Installed: 10.0.23+maria-1~trusty
Candidate: 10.0.23+maria-1~trusty
Version table:
*** 10.0.23+maria-1~trusty 0
500 http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
5.5.46-0ubuntu0.14.04.2 0
500 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
5.5.35+dfsg-1ubuntu1 0
500 http://mirrors.digitalocean.com/ubuntu/ trusty/main amd64 Packages
What step am I missing that will get the bundle install to not encounter issues with the mysql2 gem (and still use MariaDB)? mysql -uroot -p works okay from the terminal.
purge all mysql related packages
sudo apt-get remove --purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
Now, that you have a clean system. Try installing mariadb again
sudo apt-get install mariadb-server libmariadbclient-dev mariadb-client mysql-common libmysqlclient18 libmariadbd-dev
just ensure that package version you are being promted to install are the same as given on this page:
http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.0/ubuntu/pool/main/m/mariadb-10.0/
Otherwise, it will install Mysql packages from Ubuntu's official repo which will cause the conflict.If that happens, you should set maria db repo with higher priority as given on this page:
https://askubuntu.com/questions/293619/assign-higher-priority-to-ppa
Hope it helps

Is it possible to use mysql5.5 and mariaDB 10.0 in same machine?

I wanna install mariaDB 10.0 in server. but it's already installed mysql5.5.
so i tried to install mariaDB to use apt-get command.
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-ubuntuoneui-3.0 libubuntuoneui-3.0-1 thunderbird-globalmenu
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libaio1 libmariadbclient18 libmysqlclient18 mariadb-client-10.0
mariadb-client-core-10.0 mariadb-common mariadb-server-core-10.0
mysql-common
Suggested packages:
tinyca mailx mariadb-test
The following packages will be REMOVED:
libmysqlclient-dev libmysqlclient18:i386 libqt4-sql-mysql:i386
mysql-client-5.5 mysql-client-core-5.5 mysql-server mysql-server-5.5
mysql-server-core-5.5
The following NEW packages will be installed:
libaio1 libmariadbclient18 mariadb-client-10.0 mariadb-client-core-10.0
mariadb-common mariadb-server-10.0 mariadb-server-core-10.0
The following packages will be upgraded:
libmysqlclient18 mysql-common
2 upgraded, 7 newly installed, 8 to remove and 532 not upgraded.
Need to get 36.2 MB/37.1 MB of archives.
After this operation, 25.1 MB of additional disk space will be used.
Do you want to continue [Y/n]?
i dont know why mysql packages will be REMOVED.
is it impossible?
You can find the all step to install mariadb alongside mysql in mariadb website:
https://mariadb.com/kb/en/mariadb/installing-mariadb-alongside-mysql/