Solved MariaDB and py-MySQLdb conflicting

So I'd like to run MariaDB instead of MySQL, but I need to have databases/py-MySQLdb installed on the same system.

The problem is databases/py-MySQLdb insists it needs databases/mysql56-client, which conflicts with databases/mariadb101-client, which is required by databases/mariadb101-server.

Except, it seems like there shouldn't be an issue. Based on the ports page and pkg info, all databases/py-MySQLdb actually needs is libmysqlclient.so.18. Based on pkg info and ldconfig -r, databases/mariadb101-client provides all the same libmysqlclient* as databases/mysql56-client. Yet pkg stubbornly insists on installing databases/mysql56-client.

Code:
# pkg install py27-MySQLdb mariadb101-server
Updating custom repository catalogue...
    custom repository is up-to-date.
    All repositories are up-to-date.
    Checking integrity... done (1 conflicting)
      - mariadb101-client-10.1.17 conflicts with mysql56-client-5.6.32 on /usr/local/bin/msql2mysql
    Cannot solve problem using SAT solver, trying another plan
    Checking integrity... done (0 conflicting)
    The following 2 package(s) will be affected (of 0 checked):

    New packages to be INSTALLED:
        py27-MySQLdb: 1.2.5
        mysql56-client: 5.6.32

    Number of packages to be installed: 2

    The process will require 45 MiB more space.

    Proceed with this action? [y/N]: Please type 'Y[es]' or 'N[o]' to make a selection

Is there a way I can solve this with either ports or packages?
 
Thanks, but it still gives me the same problem:

Code:
pkg install mariadb101-server py27-MySQLdb56
Updating custom repository catalogue...
    custom repository is up-to-date.
    All repositories are up-to-date.
    Checking integrity... done (1 conflicting)
      - mysql56-client-5.6.32 conflicts with mariadb101-client-10.1.17 on /usr/local/bin/msql2mysql
    Cannot solve problem using SAT solver, trying another plan
    Checking integrity... done (0 conflicting)
    The following 2 package(s) will be affected (of 0 checked):

    New packages to be INSTALLED:
        mariadb101-server: 10.1.17
        mariadb101-client: 10.1.17

    Number of packages to be installed: 2

    The process will require 203 MiB more space.

    Proceed with this action? [y/N]:
 
If you have time to take a look at databases/mysql56-client/Makefile
Code:
CONFLICTS_INSTALL=      mysql5[0-57-9]-client-* \
                        mariadb*-client-* \
                        percona*-client-*

Also see databases/mariadb101-server/Makefile
Code:
CONFLICTS_INSTALL=      mariadb5*-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
                        mariadb10[02-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
                        mysql[0-9]*-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
                        percona[0-9]*-${PKGNAMESUFFIX:C/^[0-9]*-//}-*

So it's not possible to have installed both ports at same time.

Read for further details:
https://www.freebsd.org/doc/en/books/porters-handbook/conflicts.html
 
I understand that, the thing is, I don't want databases/mysql56-client, and based on my understanding, I shouldn't need it. As far as I can tell, all databases/py-MySQLdb56 has a dependency on is the shared library libmysqlclient.so.18, which is provided by databases/mariadb101-client. Yet databases/py-MySQLdb56 is insisting on pulling in databases/mysql56-client. I've even read the databases/py-MySQLdb56/Makefile and databases/py-MySQLdb/Makefile and couldn't find the dependency or a way to change it (though that hardly means it's not there).
 
if you use official packages, you get mysql, period. If you want mariadb or perconadb, you'll have to set the proper variable in make.conf and build them yourself (preferably in a builder like synth or poudriere and set the variable the builder's make.conf).
 
Ahhh! That was the clue I needed. I had looked at make.conf, but apparently hadn't looked close enough. I created /usr/local/etc/poudriere.d/make.conf (I am using poudriere) with
Code:
DEFAULT_VERSIONS= mysql=10.1m
based on this page and sure enough of the next build the dependency changed.

Thanks!
 
Last edited by a moderator:
There are more defaults you can change, have a look in /usr/ports/Mk/bsd.default-versions.mk.
 
Back
Top