Mysql client linux установка

Mysql client linux установка

MySQL 8.0 Reference Manual Including MySQL NDB Cluster 8.0

2.5.5 Installing MySQL on Linux Using Debian Packages from Oracle

Oracle provides Debian packages for installing MySQL on Debian or Debian-like Linux systems. The packages are available through two different channels:

  • The MySQL APT Repository. This is the preferred method for installing MySQL on Debian-like systems, as it provides a simple and convenient way to install and update MySQL products. For details, see Section 2.5.2, “Installing MySQL on Linux Using the MySQL APT Repository”.
  • The MySQL Developer Zone’s Download Area. For details, see Section 2.1.3, “How to Get MySQL”. The following are some information on the Debian packages available there and the instructions for installing them:
  • Various Debian packages are provided in the MySQL Developer Zone for installing different components of MySQL on the current Debian and Ubuntu platforms. The preferred method is to use the tarball bundle, which contains the packages needed for a basic setup of MySQL. The tarball bundles have names in the format of mysql-server_ MVERDVER _ CPU .deb-bundle.tar . MVER is the MySQL version and DVER is the Linux distribution version. The CPU value indicates the processor type or family for which the package is built, as shown in the following table:
CPU Value Intended Processor Type or Family
i386 Pentium processor or better, 32 bit
amd64 64-bit x86 processor
$> tar -xvf mysql-server_MVER-DVER_CPU.deb-bundle.tar 
$> sudo apt-get install libaio1 
$> sudo dpkg-preconfigure mysql-community-server_*.deb 

You are asked to provide a password for the root user for your MySQL installation. You might also be asked other questions regarding the installation.

Make sure you remember the root password you set. Users who want to set a password later can leave the password field blank in the dialogue box and just press OK ; in that case, root access to the server is authenticated using the MySQL Socket Peer-Credential Authentication Plugin for connections using a Unix socket file. You can set the root password later using mysql_secure_installation .

$> sudo dpkg -i mysql-_*.deb 

There are also packages with server-core and client-core in the package names. These contain binaries only and are installed automatically by the standard packages. Installing them by themselves does not result in a functioning MySQL setup. If you are being warned of unmet dependencies by dpkg (such as libmecab2), you can fix them using apt-get :

sudo apt-get -f install
  • All configuration files (like my.cnf ) are under /etc/mysql
  • All binaries, libraries, headers, etc., are under /usr/bin and /usr/sbin
  • The data directory is under /var/lib/mysql
Читайте также:  Linux vps with gui

Debian distributions of MySQL are also provided by other vendors. Be aware that they may differ from those built by Oracle in features, capabilities, and conventions (including communication setup), and that the instructions in this manual do not necessarily apply to installing them. The vendor’s instructions should be consulted instead.

Источник

How to Install MySQL Client on Ubuntu

MySQL is popular is popular open-source relational database management system. The program that interfaces with the server is known as a MySQL client. The most basic client that you can use is the command line tool, most commonly known as MySQL client.

To install the mysql client on Ubuntu 18.04, open the terminal window and execute:

apt-get install mysql-client

The command-line tools allow you to interact with the server and It also allows you to run MySQL commands in shell scripts and other programs (For example, cron to perform maintenance and backup jobs).

The Ubuntu mysql-client package includes following command line tools (and more):

  • mysql — the mysql command-line client to run SQL statements.
  • mysqladmin — client for administering a MySQL server.
  • mysqldump — a database backup program. The mysqldump command writes the contents of database tables into text files which you can use to restore databases.
  • mysqlreport — Makes a friendly report of important MySQL status values.
  • mysqlcheck — a command line client to check, repair, and optimize tables.

The Ubuntu MySQL client can install as a stand-alone command-line tool, for example, you can install mysql server on one computer and the client package on another computer running Ubuntu operating system. In that case you need to use -h flag with mysql client to indicate the server IP address or domain name.

Читайте также:  Convert img to vhd linux

Note that mysql server should allow remote access to the server, in order for the MySQL client to connect from a remote location.

Источник

Is there a way to only install the mysql client (Linux)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Are there are any Linux mysql command line tools that don’t require the entire mysql db installation package to be installed? What I’m trying to do is from server #1 (app server), execute mysql commands that will get executed on server #2 (db server). I do not want to run the db on the local server or to install the full blown mysql db.

This is a totally valid question, the answers below are totally relevant, and they totally solve the problem that I had, even if they’re only from the perspective of one specific Linux distro (e.g. yum = RedHat / CentOS and apt = Debian / Ubuntu). So I have an edit to make the question more «Q-and-A-like» in the review queue that I would appreciate if someone could approve.

Recommendation questions are explicitly off-topic. This question is just spawning a stream of package recommendations.

This is a 10+ year old question, but still unedited and weak. A question needs to be much more specific. Foremost problem on this one: What distribution of Linux? ANY question asking «what do I do under Linux ..» should be edited. The answers you will get will tend to be equally as vague, hit & miss and will mention things that are distro specific such as YUM, APT, DNF, PKG along w/ various repo filenames. You can’t get a good, specific answer without a good question.

Читайте также:  Послать команду выключения linux

8 Answers 8

To install only mysql (client) you should execute

To install mysql client and mysql server:

yum install mysql mysql-server 

On a current Fedora system you should use yum install mariadb and yum install mariadb-server . Fedora replace MySQL with MariaDB.

This answer is incorrect. yum install mysql will install the server component as it will try to install mariadb : mariadb.x86_64 : A community developed branch of MySQL

You should consider using mariadb-client instead. See mariadb.com/kb/en/mariadb/yum for detail instructions. In short, you need to 1) Add mariadb repo for yum. 2) run yum install MariaDB-client. That’s it (assuming you are using RH or CentOS). For ubuntu, see answer from Jon Black.

sudo apt-get install default-mysql-client 

Is it only me getting E: Package ‘mysql-client’ has no installation candidate ? ( I run the update command first and still getting this )

[root@localhost administrador]# yum search mysql | grep client community-mysql.i686 : MySQL client programs and shared libraries : client community-mysql-libs.i686 : The shared libraries required for MySQL clients root-sql-mysql.i686 : MySQL client plugin for ROOT mariadb-libs.i686 : The shared libraries required for MariaDB/MySQL clients [root@localhost administrador]# yum install -y community-mysql 

Install MySQL Client: 1. sudo yum install -y dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm 2. sudo rpm —import repo.mysql.com/RPM-GPG-KEY-mysql-2022 3. sudo yum install -y mysql-community-client

If mysql-client is not available, you may use mariadb-client :

sudo apt-get install mariadb-client 
yum -y groupinstall "MYSQL Database Client" 
sudo apt-get install mysql-client-core-5.5 

there are two ways to install mysql client on centOS.

1. First method (download rpm package)

enter image description here

download rpm package from mysql website https://downloads.mysql.com/archives/community/

if you download this rpm package like picture, it’s filename like mysql-community-client-8.0.21-1.el8.x86_64.rpm.

then execute sudo rpm -ivh —nodeps —force mysql-community-client-8.0.21-1.el8.x86_64.rpm can install the rpm package the parameters -ivh means install, print output, don’t verify and check.

if raise error, maybe version conflict, you can execute rpm -pa | grep mysql to find conflicting package, then execute rpm -e —nodeps to remove them, and install once more.

finnaly, you can execute which mysql , it’s success if print /usr/bin/mysql.

2.Second method (Set repo of yum)

Please refer to this official website:

Источник

Оцените статью
Adblock
detector