Mysq Installation Summary and mysq Summary

Source: Internet
Author: User

Mysq Installation Summary and mysq Summary

What I learned today is the installation of the mysql database. Here I will use the Binary Package for installation. If you are not familiar with the compilation optimization, we recommend that you use a binary package instead of the source code. I believe that official source code compilers will be more powerful than general developers. In addition, if Binary Package installation fails, more help can be found. The following describes how to install a binary package.

1: Download the specified installation package from the official website.

The address is http://dev.mysql.com/downloads/mysql/5.6.html#downloads. the download name isLinux-Generic (glibc 2.5) (x86, 64-bit), Compressed TAR Archive

The downloaded file is mysql-5.6.27-linux-glibc2.5-x86_64.tar.gz. As for how you put it in linux, you can use rz or directly download the binary Installation File Using wget in linux. I downloaded it and put it under/root.

2: Create a mysql installation user

Directly check the INSTALL-BINARY file for User Creation statements.

The statement is groupadd mysql.

Useradd-r-g mysql

3: Create a soft connection under/usr/local/for the unzipped directory and attach the permission.

Cd/usr/local

Ln-s/opt/mysql/mysql-5.6.27-linux-glibc2.5-x86_64 mysql

Chown-R mysql: mysql

Chown-R mysql: mysql/

4: Create the mysql database data directory, binlog directory and tmp directory

Mkdir/data/mysql/{data, logs, tmp}

Chown-R mysql: mysql/data/mysql

5: configure the my. cnf file.

Configure user, datadir, tmpdir, binlog, and put it in the place you want to put it in/etc.

6: Initialize the data database directory

Cd/usr/lcoal/mysql

. Scripts/mysql_install_db -- defaults-file = '/etc/my. cnf'

You can see two OK statements.

All the installation work here is fine.

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.