CentOS Linux 5/6: Install MySQL Client Only

I have MySQL database server running on Sun Solaris Unix based server. I am using CentOS and I would like to install mysql client only? How do I install mysql client only but skil the entire mysql database installation on CentOS Linux? Is there a way to only install the mysql client on CentOS Linux based Lenovo thinkpad T series?

Tutorial details
Difficulty Easy (rss)
Root privileges Yes
Requirements None
Time 2m
Yes, you can only install MySQL client programs and shared libraries on your CentOS based laptop or development workstation/server. No need to install the MySQL database server on CentOS. You need to install the following package:

  • mysql : This package is a client/server implementation consisting of a mysql client nd many different client programs and libraries. It also contains the standard MySQL client programs and generic MySQL files.

Install mysql client on CentOS

Open the terminal or login to the workstation/laptop/dev-server using ssh client. Type the following commandyum command as a root user:
# yum install mysql
Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.wiredtree.com
 * extras: mirrors.serveraxis.net
 * updates: bay.uchicago.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.71-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
 Package         Arch             Version                  Repository      Size
 mysql           x86_64           5.1.71-1.el6             base           893 k
Transaction Summary
Install       1 Package(s)
Total download size: 893 k
Installed size: 2.4 M
Is this ok [y/N]: y
Downloading Packages:
mysql-5.1.71-1.el6.x86_64.rpm                            | 893 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : mysql-5.1.71-1.el6.x86_64                                    1/1 
  Verifying  : mysql-5.1.71-1.el6.x86_64                                    1/1 
  mysql.x86_64 0:5.1.71-1.el6                                                   

How do I use mysql client?

The basic syntax is:

mysql -u nixcraft -h server1.cyberciti.biz -p salesdata

See mysql(1) command man page for more information.

This entry is 2 of 5 in the CentOS Linux MySQL Server Tutorial series. Keep reading the rest of the series:
  1. CentOS install Mysql database server
  2. CentOS install MySQL client only
  3. MySQL Create a user accounts
  4. MySQL Create a database & tables and data
  5. Reinstall MySQL On Linux

🐧 Please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
2 comments… add one
  • samuvel subasingh Feb 25, 2015 @ 12:01

    I need mysql client rpm & installation document

  • Amit Chauhan Mar 12, 2016 @ 7:45

    Thanks for your guidance , it’s good examples for beginers…..

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @ webmaster@cyberciti.biz