Mysql one of the various ways to install the toss: RPM mode installation

Source: Internet
Author: User
Tags mysql manual

---------life is endless, tossing


Mysql one of the various ways to install the toss: RPM mode installation

1 MySQL rpm installation.

Environmental rhel6.4+mysql5.5.40

1.1 Downloads

The official website downloads the corresponding RPM package, does not say much.

1.2 Installation

A command to resolve

RPM-IVH mysql-server-5.5.40-1.el6.x86_64.rpm

--------------------------------------------------------------------------------

Here by checking the official website installation documents, there are some parameters need to be clear, look at this table, is not your very concerned about the parameters have fallen, haha.

Table 2.9 MySQL installation Layout for Linux RPM Packages

DirectoryContents of directory

/usr/binClient programs and scripts

/usr/sbinthe MYSQLD server

/var/lib/mysqlLog files, databases

/usr/share/infoMySQL Manual in info format

/usr/share/manUnix manual pages

/usr/include/mysqlinclude (header) files

/usr/lib/mysqlLibraries

/usr/share/mysqlMiscellaneous support files, including error messages, character set files, sample Configuration files, SQL for database installation

/usr/share/sql-benchBenchmarks


1.3 Configuration

Cp/usr/share/mysql/my-medium.cnf/etc/my.cnf

It is better to specify the character set with a few parameters, we do not need to determine the parameters, all parameters must be fixed, and we have to be clear.

[Client]

Default-character-set = UTF8


[Mysqld]

Default-storage-engine = INNODB

Character-set-server = UTF8

Collation-server = Utf8_general_ci


1.4 can start.

Service MySQL Start

View logs at the same time (be sure to have a habit of starting and watching logs)

Tail-f/var/lib/mysql/host-name.error

Of course, after viewing the success prompt is the start of success, you can log on

Initial no password

Mysql command Log in directly

Password can be changed after entering mysql> command line

Set password =password (' 123456 ')

All roads Change the code, you can also

Mysqladmin-uroot password ' newpass '//This only adapts to the new setup password, which is the case of the original without the password.


1.5 Special cases when you destroy the MySQL data directory.

Yes, that is, you deleted the/var/lib/mysql, the directory used to save MySQL data files, you can do so.

Manually create the/var/lib/mysql directory.

/usr/bin/mysql_install_db

Once this command succeeds, it will re-command all the data files required for all databases to run.

It's like this.




Some parameter data:

http://dev.mysql.com/doc/refman/5.5/en/linux-installation-rpm.html Documentation

http://downloads.mysql.com/archives/community/Download Package

Http://img.jb51.net/shouce/mysql/MySQL/index.html Official manual Chinese version


Mysql one of the various ways to install the toss: RPM mode 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.