Redhat linux on MySQL installation-rpm installation

Source: Internet
Author: User

Linux on the platform Mysql There are typically three ways to install, namely:

Rpm installation

General Two into Package Installation

Source Code Install package

This article will first RPM Installation Method into Line Introduction, this is the main or open source community version of the introduction, first download

http://dev.mysql.com/downloads/mysql/

You can choose the type of installation package for different platforms, and the latest version is The 5.7.11,rpm version also has various types, so that you can choose the appropriate installation package:

Package Name

Summary

Mysql-community-server

Database Server and related tools

Mysql-community-client

MySQL client applications and tools

Mysql-community-common

Common files for server and client libraries

Mysql-community-devel

Development header files and libraries for MySQL database client applications

Mysql-community-libs

Shared Libraries for MySQL database client applications

Mysql-community-libs-compat

Shared compatibility Libraries for previous MySQL installations

mysql-community-embedded

MySQL Embedded Library

Mysql-community-embedded-devel

Development header files and libraries for MySQL as a embeddable library

Mysql-community-test

Test Suite for the MySQL server

Its specific name structure is as follows:

PackageName -Version-distribution-arch. RPM

Version does not have to say, in fact, is the database versions, distribution and arch represents the Linux type and the CPU platform to build the installation package, the specific distribution flags are as follows:

Distribution Value

Intended use

El5 , el6 , El7

Red Hat Enterprise linux/oracle Linux/centos 5, 6, or 7

FC22 , fc23

Fedora 23 or

Sles12

SUSE Linux Enterprise Server 12

For example:mysql-community-server-5.7.11-1.el7.x86_64.rpm, RedHat Enterprise linux 7/oracle Linux 7 ( x86, 64-bit), on the rpmpackage
MySQL Server
installation package

Installing it is simple:

Shell> RPM-QPL mysql-community-server-version-distribution-arch.rpm

can see RPM package is simple to install, more suitable for beginners, but need to download the appropriate installation package according to the specific needs, such as server and client need separate installation, see the table above;

In addition, the installation path is not flexible, the default path is not modifiable, so a only one server can be installed on the server, with the following path:

Files or Resources

Location

Client Programs and Scripts

/usr/bin

mysqld Server

/usr/sbin

Configuration file

/etc/my.cnf

Data Directory

/var/lib/mysql

Error log File

for RHEL, Oracle Linux, CentOS or Fedora platforms: /var/log/mysqld.log

For SLES: /var/log/mysql/mysqld.log

Value of Secure_file_priv

/var/lib/mysql-files

System V init script

for RHEL, Oracle Linux, CentOS or Fedora platforms: /etc/init.d/mysqld

For SLES: /etc/init.d/mysql

SYSTEMD Service

for RHEL, Oracle Linux, CentOS or Fedora platforms: mysqld

For SLES: MySQL

Pid file

/var/run/mysql/mysqld.pid

Socket

/var/lib/mysql/mysql.sock

Keyring Directory

/var/lib/mysql-keyring

Unix manual Pages

/usr/share/man

Include (header) files

/usr/include/mysql

Libraries

/usr/lib/mysql

Miscellaneous support Files (for example, error messages, and character set files)

/usr/share/mysql

after the installation is complete MySQL does not start automatically, but it needs to be started manually:

Shell> Service mysqld Start

After initializing the server, the super account ' root ' @localhost ' was created and the user's password was produced in the error log file, using
shell> grep ' temporary password '/var/log/mysqld.log

Can be found, login to change the password can:

Shell> mysql-uroot-p
Mysql> ALTER USER ' root ' @ ' localhost ' identified by ' mynewpass4! ';

It 's done. RPM installation package is still very fast.


This article is from the "Marvelyu's Notes" blog, so be sure to keep this source http://marvelyu.blog.51cto.com/471030/1747802

Redhat linux on MySQL installation-rpm installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.