Home > Database > Mysql Tutorial > How to use binary method to install mysql in linux

How to use binary method to install mysql in linux

黄舟
Release: 2017-08-13 10:40:03
Original
1553 people have browsed it

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.

The example in this article shares with everyone the use of binary method in Linux. The specific steps to install mysql are for your reference. The specific content is as follows

1. Download the binary file

Download mysql-5.6.36-linux-glibc2.5- on the official website i686.tar.gz.

2. Unzip the file and move it to the /usr/local/mysql directory


tar -zxvf mysql-5.6.36-linux-glibc2.5-i686.tar.gz
Copy after login

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/
Copy after login

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
Copy after login

5. Start service test


service mysqld start
mysql -u root
Copy after login

The above is the detailed content of How to use binary method to install mysql in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template