# p5-DBD-mysql port insists on downgrading back to mysql56-client.



## rtwingfield (May 25, 2016)

Why does the p5-DBD-mysql port insist on installing the databases/mysql56-client when the mysql57-client-5.7.12, and server, are already installed?  I need the DBD, but I do not want the installation of the DBD to override or otherwise take a step back in time and downgrade the MySQL Client and Server to v5.6.

Why is this happening?  I’ve already erased all things MySQL and allowed Synth to yet again reinstall the mysql57-server-5.7.12 . . .which by the way, apparently installs the corresponding client as part and parcel with the server . . .thank you very much; however, if  

`# synth status databases/p5-DBD-mysql`    . . .is run, the report is;


```
Scanning existing packages.
These are the ports that would be built ([N]ew, [R]ebuild, [ U]pgrade):
  N => databases/mysql56-client
  N => databases/p5-DBD-mysql
Total packages that would be built: 2
The complete build list can also be found at:
/tmp/synth_status_results.txt
```

Synth reports that mysql56-client will be built.  Damit!  (and it does . . .if you let it -- screws-up the whole MySQL installation.)
_  . . .why???  the mysql57-client is ALREADY is installed?_

I think this is yet another issue that needs to be escalated to _Bugzilla_.  (I'm tired of this___)
I don't think this is a Synth problem, but rather a goober in the make file.


----------



## protocelt (May 26, 2016)

rtwingfield said:


> I think this is yet another issue that needs to be escalated to _Bugzilla_. (I'm tired of this___)
> I don't think this is a Synth problem, but rather a goober in the make file.


It's definitely not a Synth problem. databases/p5-DBD-mysql requires libmysqlclient.so.18 which is a library specific to the databases/mysql56-client port, hence the version clash.

You could file a bug as you suggested above(recommended), or ask the maintainer of databases/p5-DBD-mysql to update the port to support databases/mysql57-client as well if that's an option.


----------



## kpa (May 26, 2016)

Make sure you set appropriate DEFAULT_VERSIONS in /usr/local/etc/synth/LiveSystem-make.conf. Whatever you set on host's /etc/make.conf has no effect on Synth's builds if that wasn't clear already.


```
DEFAULT_VERSIONS += mysql=57
```


----------



## rtwingfield (May 26, 2016)

kpa said:


> Make sure you set appropriate DEFAULT_VERSIONS in /usr/local/etc/synth/LiveSystem-make.conf. Whatever you set on host's /etc/make.conf has no effect on Synth's builds if that wasn't clear already.
> 
> 
> ```
> ...



No . . .wasn't clear, but did so, and running the following does not indicate that the mysql56-client will be included in the build.

`# synth status databases/p5-DBD-mysql`

```
Scanning existing packages.
These are the ports that would be built ([N]ew, [R]ebuild, [ U]pgrade):
  N => databases/p5-DBD-mysql
Total packages that would be built: 1
The complete build list can also be found at:
/tmp/synth_status_results.txt
```



protocelt said:


> You could file a bug as you suggested above(recommended), or ask the maintainer of databases/p5-DBD-mysql to update the port to support databases/mysql57-client as well if that's an option.



I think I will, because I just don't trust that the DBD port to be built will be compatible, and as I've mentioned, I'm tired of all these "do overs".


----------



## kaN5300 (May 25, 2017)

Quick check of the bugzilla show 2 issues with some interesting comments. One from Mathieu Arnold says:



> The default MySQL is 5.6, so the packages are built with it, so, it is only logical that if you run pkg upgrade using the FreeBSD package repository, pkg tries to downgrade from 5.7 to 5.6.



And second also from Mathieu:


> I just tried this in a clean jail without DEFAULT_VERSIONS=mysql=57:
> 
> cd /usr/ports/databases/mysql57-client && make install
> cd /usr/ports/databases/p5-DBD-mysql && make install
> ...



I tried compile DBD module myself from source and also installing from ports on 11.0-RELEASE-p2 running inside jail. Works fine. The issue is only in pkg system, but it is normal coz mysql 5.6 is still default in FreeBSD.

`cat /usr/ports/Mk/bsd.default-versions.mk | grep MYSQL_DEFAULT
MYSQL_DEFAULT?=   5.6`


----------



## Hornpipe2 (May 27, 2019)

So, it's now 3 years later, and databases/p5-DBD-mysql _still_ depends on databases/mysql56-client by default.

Surely there is a better solution to this?  Maybe split databases/p5-DBD-mysql into multiple, version-specific ports?


----------



## SirDice (May 27, 2019)

Hornpipe2 said:


> So, it's now 3 years later, and databases/p5-DBD-mysql _still_ depends on databases/mysql56-client by default.


The default MySQL version _is_ 5.6. That said, if you change the default it's going to depend on whatever MySQL version you want:

```
root@molly:~ # pkg info -d p5-DBD-mysql
p5-DBD-mysql-4.050:
        perl5-5.28.2
        p5-DBI-1.642
        mariadb102-client-10.2.24
```
See how mine depends on databases/mariadb102-client?


----------

