Database

How To Install Only MySQL Client On CentOS/Redhat 6/7/8 or Ubuntu

Question :- I have MySQL database server running on CentOS and I would like to install only MySQL Client without installing MySQL server on the server. Do you have any idea how can I install only MySQL Client on CentOS and Linux based system.

Answer :- Yes, It is very easy to install only MySQL client Program and shared libraries on your Linux based system and no need to install the MySQL database server. Follow the below command to install it on Linux based system.

Client MySQL :- This package is a server/client implementation consisting of a MySQL client and many different client programs and libraries.

MySQL Server :- MySQL server is the most popular open source relational database management system (RDBMS). MySQL has become the leading database choice web-based applications, Used by high profile web properties including Facebook, Youtube, Twitter, Yahoo! and many more.

Install MySQL Client on CentOS/Redhat 6/7/8

You will need to root access privilege to install the below package. Now Open the terminal and login to the Linux system using SSH. Now follow the below command.

# yum install mysql

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!

Install MySQL Client on Ubuntu and Debian

To install only Client on Ubuntu and Debian based system you will need to use apt-get command. Follow the below command to install Client on Ubuntu.

$ sudo apt-get install mysql-client

OR Alternatively

$ sudo apt-get install mysql*

Usage

Follow the basic syntax to access your database server using Client.

mysql -u USER-NAME -h MYSQL-DATABASE-SERVER-IP-ADDRESS -p DB-PASSWORD
# mysql -u look_user -h app1.looklinux.com -p look_password

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 170603
Server version: 5.6.27 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

That’s It.

Suggested Read

I hope this article will help to install only Client on your Linux system. If you have any queries and problem please comment in comment section.

Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

4 Comments

Leave a Comment