MySQL installation method and simple configuration in RHEL6.4

Source: Internet
Author: User
1. mySQL Installation Method Overview 1. rpm package yum installation 2. general Binary Package installation 3. source code compilation installation note: the system platform used in the experiment is: RHEL6.42.rpminstall mount the disc to set the system yum source, directly use the following command line: # yumlist | grepmysql-servermysql-server.x86_645.1.

1. MySQL Installation Method

1. Install the rpm package yum

2. General Binary Package Installation

3. source code compilation and Installation

Note: The system platform used in the experiment is RHEL6.4.

2. rpm install

Use the following command line to mount the disk and set the system yum Source:

# Yum list | grep mysql-server

Mysql-server.x86_64 5.1.66-2. el6_3 rhel6.4 _ x86_64

# Yum install mysql-server mysql-devel-y

# Rpm-qi mysql-server View information about installing mysqlserver

# Run rpm-ql mysql-server to view the files generated by installing mysql server

# During service mysql start startup, related mysql databases are initialized.

# Chkconfig mysqld on


In RHEL6.4, the default version is 5.1.66. After the installation is complete, the data directory is/var/lib/mysql (we recommend that you change and use lv)

If you need the latest version can go to the official website to download http://dev.mysql.com/downloads/mysql/

Reading:

CentOS MySQL installation and configuration process detailed explanation of http://www.linuxidc.com/Linux/2014-03/97588.htm

MySQL installation (rpm) and startup configuration http://www.linuxidc.com/Linux/2014-02/96527.htm

The MySQL installation script is just executed to install http://www.linuxidc.com/Linux/2014-01/95193.htm

Linux MySQL installation detailed explanation http://www.linuxidc.com/Linux/2013-01/77802.htm

On CentOS MySQL installation configuration instructions http://www.linuxidc.com/Linux/2012-12/76914.htm

3. General Binary Package format installation (taking MySQL5.5.33 as an example)

. Prepare the logical volume to store data (it is recommended that noatime be used for mounting without updating the access time)

3. 2. Simple Installation

Default Value:/usr/local/mysql/data:/mydata/data

Note: The vim/etc/my. cnf content is as follows:

[Mysqld]

Thread_concurrency = 4 # twice the CPU physical core

Datadir =/mydata/data # modify the directory of the data file

3. Start the service and view the monitoring port

If you forget the service password, you can modify the start option parameter of the script to add -- skip-grant -- skip-networking to skip verification.

3. 4. perform the following operations to set the environment:

# Vim/etc/profile. d/mysqld. sh modify the PATH

Export PATH =/usr/local/mysql/bin: $ PATH

# Source/etc/profile reload

# Ln-sv/usr/local/mysql/include/usr/include/mysql link header file

# Ls/usr/include/mysql/

# Vim/etc/ld. so. conf. d/mysql. conf Add a library file

/Usr/local/mysql/lib

# Ldconfig-v | grep mysql verifies the dynamic link library

/Usr/local/mysql/lib:

Libmysqlclient. so.18-> libmysqlclient_r.so.18.0.0

/Usr/lib64/mysql:

Libmysqlclient. so.16-> libmysqlclient. so.16.0.0

Libmysqlclient_r.so.16-> libmysqlclient_r.so.16.0.0

# Vim/etc/man. config

MANPATH/usr/local/mysql/man


. Log on to the database to delete anonymous users and provide dedicated authorized accounts for related applications

Note: permissions authorized by mysql users can be transferred

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.