wget -i -c http://dev.mysql.com/get/mysql80-community-release-el7-11.noarch.rpm #https://dev.mysql.com/downloads/
yum -y install mysql80-community-release-el7-11.noarch.rpm
yum -y install mysql-community-server
systemctl start mysqld.service
systemctl status mysqld.service
grep "password" /var/log/mysqld.log
mysql -uroot -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
yum -y remove mysql80-community-release-el7-11.noarch.rpm #卸载yum源
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
#扩硬盘
lsblk
df -h
pvcreate /dev/sdb
pvdisplay
vgdisplay
vgextend centos /dev/sdb #看VG Name
lvscan
lvextend -l +100%FREE /dev/mapper/centos-root
xfs_growfs /dev/mapper/centos-root
vgcreate vg_data /dev/sdb
lvcreate -l +100%FREE vg_data -n lv_data
mkfs.xfs /dev/vg_data/lv_data
mount /dev/vg_data/lv_data /data
vim /etc/fstab
/dev/mapper/vg_data-lv_data /data xfs defaults 0 0
#pv再扩容
pvscan
pvresize /dev/sdb
pvscan
vgdisplay
lvscan
lvextend -l +100%FREE /dev/centos/root
lvscan
df -hT
xfs_growfs /dev/mapper/centos-root #xfs格式的
resize2fs /dev/xxx #ext3或ext4格式的
rw init=/sysroot/bin/sh
ctrl+x
chroot /sysroot/
passwd
xxx
/.autorelabel