Home » Installing MySQL Client

Installing MySQL Client

by shedboy71

The MySQL Client can be used to connect to MySQL Server databases across a network. It provides a text-based interface to a MySQL Server.

Commands

# Install MySQL Client from the Debian repository
sudo apt-get install mysql-client

The package manager may suggest some dependencies for MySQL Client. Press “Y” then “enter”  to continue installation.

Testing Your Installation

The following instructions make these assumptions:

  • You have an existing MySQL Server, whether on localhost or elsewhere across the network
  • The existing MySQL Server “listens for” (accepts) network connections (disabled on a default installation of MySQL Server)
  • The MySQL Server has Allowed “root” login over a network connection (disabled on a default installation of MySQL Server) or A MySQL user account for you

Testing Your Installation

# Verify the MySQL Client was installed
mysql --version
# Connect to a remote MySQL Server (assumes the server allows root access from a remote computer)
mysql --host=server_address --user=root --password=password
# Connect to a remote MySQL Server (assumes the server has already created your user account)
mysql --host=server_address --user=user_name --password=password

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More