CentOS Linux 5/6: Install MySQL Client Only

by on December 3, 2012 · 0 comments· LAST UPDATED December 4, 2013

in , , ,

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
DifficultyEasy (rss)
Root privilegesYes
RequirementsNone
Estimated completion time2m
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.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , ,

Previous Faq:

Next Faq: