rpm -qa | grep mysql
yum remove 软件包名
rpm -qa | grep mariadb
rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64
find / -name mysql
rm -rf /usr/lib64/mysql
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-11.noarch.rpm
yum clean all
yum makecache
yum list | grep mysql
yum install mysql-community-server
dnf localinstall https://dev.mysql.com/get/mysql80-community-release-el8-9.noarch.rpm
cd /etc/yum.repos.d && ls -l
dnf repolist enabled | grep "mysql.*-community.*"
dnf module disable mysql
dnf info mysql-community-server
dnf install mysql-community-server
mysqld --version
systemctl start mysqld
systemctl status mysqld
systemctl enable mysqld
mysql -uroot -p
grep 'temporary password' /var/log/mysqld.log
mysql_secure_installation
default-authentication-plugin=mysql_native_password
prot=3307
use mysql;
select host,user from user;
UPDATE user SET Host='%' WHERE User='root' AND Host='localhost' LIMIT 1;
flush privileges;
apt install @mysql
vi /etc/mysql/mysql.conf.d/mysqld.cnf
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
UPDATE mysql.user SET host='%' WHERE user='root';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123';
flush privileges;
https://blog.csdn.net/qq_40243950/article/details/106651484