Simple installation of mysql and mysql

Source: Internet
Author: User

Simple installation of mysql and mysql
For simple installation of mysql, we can download the binary distribution version of Mysql directly from the Mysql official website, such as LInux x86_64, and decompress the package to use it in green. Http://www.mysql.com/downloads/
Create OS users and groups
Groupadd mysql
Useradd-g mysql
The group name and user name are not named as mysql, and the group name and user name are not required to be consistent.

Decompress green
Extract the installation media to/usr/local or any directory that you have permission.
[Root @ erpt1 ~] # Tar-xzvf mysql-5.6.20-linux-glibc2.5-x86_64.tar.gz-C/usr/local
[Root @ erpt1] #
[Root @ erpt1] # cd/usr/local & ln-s/usr/local/mysql-5.6.20-linux-glibc2.5-x86_64 mysql
The Russian soft connection is established later to make it easier for us to access the mysql directory.

Change owner
# Chown-R mysql: mysql/usr/local/mysql-5.6.20-linux-glibc2.5-x86_64
[Root] # chown-R mysql: mysql/usr/local/mysql

Environment Variable
Add/usr/local/mysql/bin to PATH

Install db
[Mysql @ erpt1 mysql] $ cd/usr/local/mysql & scripts/mysql_install_db -- user = mysql
Mysql_install_db creates a default option my. cnf in the basic directory.

Start mysql database
Mysqld_safe &
Log on to Mysqlmysql-uroot


How to easily check that the mysql database has been installed

Open the task manager and check whether there are any processes with 'mysql'. If yes, mysql is running.

Which of the following is a simple installation method for installing mysql in linux?

Rpm is easier than tar.gz. Rpmis equivalent to manual installation, and tar.gz is equivalent to custom 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.