Home  >  Article  >  Database  >  Detailed explanation of Linux using binary method to install mysql

Detailed explanation of Linux using binary method to install mysql

小云云
小云云Original
2017-12-22 14:39:131462browse

This article mainly introduces in detail the steps to install mysql in Linux using binary method. It has certain reference value. Interested friends can refer to it. I hope it can help everyone.

1. Download the binary file

Download mysql-5.6.36-linux-glibc2.5-i686.tar.gz.

2 on the official website. Unzip the file and Move to the /usr/local/mysql directory


tar -zxvf mysql-5.6.36-linux-glibc2.5-i686.tar.gz

3, create user groups and users and configure


groupadd mysql
useradd mysql -g mysql
chown -R mysql /usr/local/mysql/
chgrp -R mysql /usr/local/mysql/

4. Installation and initialization


#安装mysql
/usr/local/mysql/scripts/mysql_install_db --user=root
#配置mysql启动文件
cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf
#将mysqld服务添加到系统中
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
#将mysql命令软链接到系统命令中
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql

5. Start service test


service mysqld start
mysql -u root

Related recommendations:

MySQL Binary Log(Binary Log)

Example of binary search method binarySearch in Java data structure

Graphic tutorial for installing MySQL5.6 in Linux environment

The above is the detailed content of Detailed explanation of Linux using binary method to install mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn