CentOS Linux 5/6: Install MySQL Client Only

last updated in Categories , , ,

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?

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

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.


2 comment

Leave a Comment