Mysql client and server with py-mysqlclient

Hello,
root@mysql:~ # uname -a
FreeBSD mysql 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
python311-3.11.9, mysql84-server, and mysql84-client are installed from latest packages.
Now I want to install py-mysqlclient
root@mysql:~ # pkg search mysqlclient
py311-mysqlclient-2.2.1 MySQL database connector for Python
root@mysql:~ # pkg install py311-mysqlclient
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (1 conflicting)
- mysql80-client-8.0.35 conflicts with mysql84-client-8.4.0 on /usr/local/bin/comp_err
Checking integrity... done (0 conflicting)
The following 5 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
mysql84-client: 8.4.0
mysql84-server: 8.4.0

New packages to be INSTALLED:
libevent: 2.1.12
mysql80-client: 8.0.35
py311-mysqlclient: 2.2.1

Number of packages to be removed: 2
Number of packages to be installed: 3

The operation will free 184 MiB.

Proceed with this action? [y/N]:
Is the only way fix it, is to install mysql80 server and client?

Cant install mysqlclient via pip so I try install via packages
(web) mad@django:~ $ pip3 install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-2.2.4.tar.gz (90 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
/bin/sh: pkg-config: not found
/bin/sh: pkg-config: not found
/bin/sh: pkg-config: not found
 
If you want to keep mysql84-client/server version 8.4.0, you need to build databases/py-mysqlclient from ports with MYSQL_DEFAULT=8.4 in /etc/make.conf

Global, for all ports
Code:
MYSQL_DEFAULT=8.4

or for individual ports
Code:
.if {.CURDIR:M*/databases/py-mysqlclient}
MYSQL_DEFAULT=8.4
.endif

The default MYSQL version is 8.0.

EDIT:
mad0, databases/py-mysqlclient comes with a lot of build dependencies. Instead of getting those dependencies build from ports install them from package, see ports(7),
Code:
     install-missing-packages
                Install missing dependencies from packages instead of building
                them.
 
Back
Top