Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install mysql 5.6 with binary package on centos system

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly gives you a brief talk about how centos system uses binary package to install mysql 5.6, related technical terms you can check online or find some related books to add, here is not involved, we will go straight to the topic, I hope centos system how to use binary package to install mysql 5.6 This article can bring you some practical help.

1 Download MySQL

https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz

I downloaded MySQL 5.6.

2. Unzip it and move it to the appropriate directory

tar -zxvf mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz

cp ./ mysql-5.6.37-linux-glibc2.12-x86_64 /usr/local/mysql

create users and groups

groupadd mysql and useradd -r -g mysql mysq

Go to source directory

cd /usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64

Create a data directory to store mysql data

mkdir data

Users and groups modifying directories

chown -R mysql:mysql .

Copy this file to the init.d directory

Add boot-up auto-start item

cp support-files/mysql.server /etc/init.d/mysqld

vi /etc/init.d/mysqld

basedir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64

datadir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/data

initialize MySQL

./ scripts/mysql_install_db --use=mysql --basedir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64

--datadir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/data

--defaults-file=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/my.cnf

Add boot-up auto-start item

chkconfig --add mysqld

chkconfig --list mysqld

Start mysql service

service mysqld start

Check if the startup is successful

netstat -anp|grep mysqld

go to the MySQL

./ bin/mysql -u root

/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/bin/mysqladmin -u root password 'new-password'

/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/bin/mysqladmin -u root -h skinglzw password 'new-password'

Centos system how to use binary package installation mysql 5.6 will first give you to talk about here, for other related issues we want to know can continue to pay attention to our industry information. Our section content captures some industry news and expertise to share with you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report