Install the MySQL client (CLI) to connect, query, and manage MySQL databases from any workstation.
The standalone MySQL client lets you test migrations, run federated queries, and move data between PostgreSQL and MySQL without installing a full MySQL server.
Use the mysql-client package on Linux, the MySQL Community installer on Windows, and Homebrew on macOS. All ship the mysql
binary plus helpful utilities like mysqldump
.
Run brew install mysql-client
.Add export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"
to your shell profile so the mysql
command is globally available.
Update apt, then run sudo apt-get install mysql-client
.The package includes mysql
, mysqldump
, and man pages.
Execute sudo dnf install mysql
(or sudo yum install mysql
on older releases) to pull the client-only RPMs.
Download the "MySQL Community x64" installer, choose "MySQL Shell" and "MySQL Server & Client" optional components, then follow the wizard. Add the install folder to the PATH.
Run mysql --version
.A version string such as mysql Ver 8.0.36 for macOS on x86_64
confirms success.
Use mysql -u readonly -p -h db.prod.local ecommerce
. After entering the password you can query tables like Customers
or Orders
.
Use mysqldump -u readonly -p --no-create-info ecommerce Customers Orders | psql postgres://user@localhost/shop
.This streams data directly from MySQL to PostgreSQL.
Create least-privilege users, avoid saving plaintext passwords, and prefer SSL connections with --ssl-mode=REQUIRED
.
Ensure the client version is not newer than the server by more than two major releases, and always append the -h
flag when connecting to remote hosts.
.
Yes on Linux because package managers write to system directories. Windows and macOS installers request elevation automatically.
No. The client package contains only command-line tools. Install the full MySQL Server if you need to host databases locally.
Absolutely. Treat Aurora like any remote MySQL instance—specify its host, port, and credentials.