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
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
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!