≡ Menu

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?

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
================================================================================
Installing:
 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 
 
Installed:
  mysql.x86_64 0:5.1.71-1.el6                                                   
 
Complete!

How do I use mysql client?

The basic syntax is:

mysql -u USER-NAME-HERE -h MYSQL-DB-SERVER-IP-ADDRESS-HERE -p DB-NAME
mysql -u nixcraft -h server1.cyberciti.biz -p salesdata

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

Sysadmin because even developers need heroes!!!

Share this tutorial on:
{ 2 comments… add one }
  • samuvel subasingh February 25, 2015, 12:01 pm

    I need mysql client rpm & installation document

  • Amit Chauhan March 12, 2016, 7:45 am

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

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: , ,