I run the following command on Mac Big Sur
mysqldump --column-statistics=0 -v -h my host -u myuser -P 3306 -pmypass mydb my_table > /tmp/dump.sql
Which uses the following version of mysqldump …
$ mysqldump --version
mysqldump Ver 8.0.27 for macos11.6 on x86_64 (Homebrew)
However, I notice when I run the above command on Ubuntu Linux, I get the error
mysqldump: [ERROR] unknown variable 'column-statistics=0'
My Ubuntu Linux runs the following version
# mysqldump --version
mysqldump Ver 10.13 Distrib 5.7.36, for Linux (x86_64)
Is it possible to update my Mac OS X mysqldump client to the same version as Ubuntu? I tried
brew install mysql-client
Which installed successfully …
$ brew install mysql-client
==> Downloading https://ghcr.io/v2/homebrew/core/zstd/manifests/1.5.2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/zstd/blobs/sha256:7a86804ef138928d6a5faed965ac23b3c0d9609231ff6f5
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:7a86804ef138928d6a5faed965ac2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mysql-client/manifests/8.0.27
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mysql-client/blobs/sha256:fccbb65d06dade7a89960791c8c60a310b17893
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:fccbb65d06dade7a89960791c8c60
######################################################################## 100.0%
==> Installing dependencies for mysql-client: zstd
==> Installing mysql-client dependency: zstd
==> Pouring zstd--1.5.2.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/zstd/1.5.2: 31 files, 2.7MB
==> Installing mysql-client
==> Pouring mysql-client--8.0.27.big_sur.bottle.tar.gz
==> Caveats
mysql-client is keg-only, which means it was not symlinked into /usr/local,
because it conflicts with mysql (which contains client libraries).
If you need to have mysql-client first in your PATH, run:
echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> /Users/myuser/.bash_profile
For compilers to find mysql-client you may need to set:
export LDFLAGS="-L/usr/local/opt/mysql-client/lib"
export CPPFLAGS="-I/usr/local/opt/mysql-client/include"
For pkg-config to find mysql-client you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/mysql-client/lib/pkgconfig"
==> Summary
🍺 /usr/local/Cellar/mysql-client/8.0.27: 135 files, 150.8MB
==> Running `brew cleanup mysql-client`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> mysql-client
mysql-client is keg-only, which means it was not symlinked into /usr/local,
because it conflicts with mysql (which contains client libraries).
If you need to have mysql-client first in your PATH, run:
echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> /Users/myuser/.bash_profile
For compilers to find mysql-client you may need to set:
export LDFLAGS="-L/usr/local/opt/mysql-client/lib"
export CPPFLAGS="-I/usr/local/opt/mysql-client/include"
For pkg-config to find mysql-client you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/mysql-client/lib/pkgconfig"
but the version is still older than what is on Linux, even after terminal restart and PATH adjustments.