当前位置:网站首页>MySQL offline deployment
MySQL offline deployment
2022-07-25 10:24:00 【Puffiness is also strong】
1. Software preparation
Mysql5.7.24tar
link :https://pan.baidu.com/s/1W21ew4LY_i3AGMzALho1zw?pwd=1234
Extraction code :1234
Linux CentOS7 7.6_1810
link :https://pan.baidu.com/s/1NV4MjfORIj290Q3scy6iYQ?pwd=pzse
Extraction code :pzse
Mind mapping tools
free , Succinct can be “ Mind mapping ” Copy and paste the article to get a mind map ( No joy, no spray. )

2. Installation steps
adopt scp The order will mysql The compressed package is uploaded to root root directory
![]()
Get into root Root directory decompression mysql Compressed package :tar -xvf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz

Query the system's own database
rpm -qa | grep -i mariadb
Uninstall the built-in database
rpm -e --nodeps mariad-libs ( Or bring the query name with the name of the database )

take mysql Unzipped files are moved to /usr/local/mysql In file
mv mysql-5.7.24-linux-glibc2.12-x86_64 /usr/local/mysql

establish mysql User group and change permissions
groupadd mysql
useradd -r -g mysql mysql
![]()
Create a data directory and give permissions
mkdir -p /data/mysql
chown mysql:mysql -R /data/mysql
cd ..

To configure my.cnf
vim /etc/my.cnf
[mysqld]
bind-address=0.0.0.0
port=3306
user=mysql
basedir=/usr/local/mysql
datadir=/data/mysql
socket=/tmp/mysql.sock
log-error=/data/mysql/mysql.err
pid-file=/data/mysql/mysql.pid
character_set_server=utf8mb4
symbolic-links=0
explicit_defaults_for_timestamp=true

Initialize database
Get into mysql Of bin Catalog
cd /usr/local/mysql/bin
![]()
initialization mysql
./mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql/ --datadir=/data/mysql/ --user=mysql --initialize
![]()
Check the password
cat /data/mysql/mysql.err

start-up mysql
First the mysql.server Placed in /etc/init.d/mysql in
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
![]()
start-up mysql( restart :service mysql restart)
service mysql start
![]()
ps -ef|grep mysql
Mysql Installation successful !
Sign in mysql And change the password
stay bin Under the document ./mysql -u root -p
![]()
Enter the password you inquired before
Change Password
SET PASSWORD = PASSWORD('123456');
Mysql8.0 Then set the password format to :ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
![]()
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
![]()
FLUSH PRIVILEGES;
Set up remote connection database
stay mysql Middle input finger :use mysql

update user set host = '%' where user = 'root';
FLUSH PRIVILEGES;
Turn off firewall
systemctl stop firewalld
systemctl disable firewalld

systemctl status firewalld
Verify remote connection
open Navicat
边栏推荐
猜你喜欢
随机推荐
struct2的原理
4、 Testfixture test fixture, or test firmware
[untitled]
Mouse monitor, Paintbrush
异常处理Exception
Swing组件之单选与多选按钮
Swing component Icon
Multithreading deadlock and synchronized
conda 配置深度学习环境 pytorch transformers
Angr (II) -- angr_ ctf
For cycle: daffodil case
关于slf4j log4j log4j2的jar包配合使用的那些事
Pow(x,n)
Set creation and common methods
21. Merge Two Sorted Lists
Pytorch calculates the loss for each sample in the batch
PyTorch 代码模板 (CNN)
Angr (VIII) -- angr_ ctf
语音自监督预训练模型 CNN Encoder 调研总结
构建 Dompteur 容器问题小记








