To install the MySQL client on CentOS 6/7/8, follow these steps:
- Update the package database:
sudo yum update
- Install the MySQL client:
sudo yum install mysql
- Verify the installation by connecting to the MySQL server:
mysql -h host -u user -p
Replace host
with the hostname or IP address of the MySQL server and user
with a valid MySQL user. You will be prompted for the password for that user.
Once you are connected to the MySQL server, you will see the MySQL prompt, indicating that the client is installed and functioning properly.