installing MySQL 5.6.26 (binary installation)

Source: Internet
Author: User

before trying yum ,rpm, compiling and installing MySQL, after a long period of testing, the simplest and most efficient way is to use a binary installation.

The system used this time is CentOS 6.4 ,mysql version is mysql-5.6.26-x86_64 bit.

: Http://pan.baidu.com/s/1bfknFo

For the installation command

1, switch path

cd/usr/local/

2, unzip the file

Tar-xfmysql-advanced-5.6.26-linux-glibc2.5-x86_64.tar.gz

3, File rename

Mv mysql-advanced-5.6.26-linux-glibc2.5-x86_64 MySQL

4, Authorization limit

Chown-rmysql.mysql/usr/local/mysql

If you are prompted without a MySQL user, create a msyql user

Groupadd MySQL

Useradd-g Mysqlmysql

5, copy my-default.cnf file to etc

Cpsupport-files/my-default.cnf/etc/my.cnf

Chownmysql:mysql/etc/my.cnf

6, initialize the data

Chmod-r 755scripts/mysql_install_db

scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--defaults-file=/ Etc/my.cnf

7, copy mysql.server to native

CP Support-files/mysql.server/etc/init.d/mysqld

chmod 700/etc/init.d/mysqld

8. Modify The/etc/profile file to configure the MySQL installation path

Vi/etc/profile

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

Or

echo "Exportpath=/usr/local/mysql/bin: $PATH"

Is the modification takes effect

Source/etc/profile

9. start MySQL

/etc/init.d/mysqldstart

set the MySQL root user password

/usr/local/mysql/bin/mysqladmin-u root password ' new-password '

/usr/local/mysql/bin/mysqladmin-u root-h localhost.localdomain Password ' New-password

Or

Set password for ' root ' @ ' localhost ' =password (' 123456 ');

mysqladmin-u root-p Password "123456"

Enter Password:"original initial password"

One, initialize the test data

/usr/local/mysql/bin/mysql_secure_installation

log in to MySQL

mysql-uroot-p123456

Add Boot start

Chkconfig--addmysql

Create a MySQL user

CREATE USER ' boomhope ' @ ' localhost ' identified by ' 123456 ';

15, Authorized Login

GRANT all privileges the Boomhope to ' boomhope ' @ ' host '


installing MySQL 5.6.26 (binary installation)

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.