用户工具

站点工具


linux:centos7
wget -i -c https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
rpm -ivh mysql80-community-release-el7-3.noarch.rpm
yum install -y mysql-community-server --nogpgcheck
mysql -V
# vi /etc/my.cnf,lower_case_table_names=1,此值必须首次运行之前固定,运行之后就不允许修改了(除非删除数据目录)
systemctl start mysqld,查看状态:systemctl status mysqld
grep password /var/log/mysqld.log,获取初始密码,mysql -p使用初始密码登录
alter user 'root'@'localhost' identified by 'ZKR#mysql8'; 必须修改初始密码
# 默认路径/usr/sbin/mysqld,/var/lib/mysql
rpm -qa|grep mariadb
rpm -e mariadb-libs-5.5.65-1.el7.x86_64 --nodeps
rpm -e --nodeps `rpm -qa|grep mysql`
yum list installed | grep mysql
yum -y remove mysql-community-server
# 报错:The GPG keys listed for the "MySQL 8.0 Community Server" repository are already installed but they are not correct for this package
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*,或使用yum install -y mysql-community-server --nogpgcheck
  • mysql
wget -i -c https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
yum -y install mysql80-community-release-el7-3.noarch.rpm,或rpm -ivh mysql80-community-release-el7-3.noarch.rpm
yum repolist all | grep mysql,或安装命令:yum install -y mysql-community-server --nogpgcheck,mysql -V查看版本
#输出结果,切换yum-config-manager --enable mysql57-community,安装yum install -y mysql-server
mysql-cluster-7.5-community/x86_64 MySQL Cluster 7.5 Community   disabled
mysql-cluster-7.5-community-source MySQL Cluster 7.5 Community - disabled
mysql-cluster-7.6-community/x86_64 MySQL Cluster 7.6 Community   disabled
mysql-cluster-7.6-community-source MySQL Cluster 7.6 Community - disabled
mysql-cluster-8.0-community/x86_64 MySQL Cluster 8.0 Community   disabled
mysql-cluster-8.0-community-source MySQL Cluster 8.0 Community - disabled
mysql-connectors-community/x86_64  MySQL Connectors Community    enabled:    192
mysql-connectors-community-source  MySQL Connectors Community -  disabled
mysql-tools-community/x86_64       MySQL Tools Community         enabled:     90
mysql-tools-community-source       MySQL Tools Community - Sourc disabled
mysql-tools-preview/x86_64         MySQL Tools Preview           disabled
mysql-tools-preview-source         MySQL Tools Preview - Source  disabled
mysql55-community/x86_64           MySQL 5.5 Community Server    disabled
mysql55-community-source           MySQL 5.5 Community Server -  disabled
mysql56-community/x86_64           MySQL 5.6 Community Server    disabled
mysql56-community-source           MySQL 5.6 Community Server -  disabled
mysql57-community/x86_64           MySQL 5.7 Community Server    disabled
mysql57-community-source           MySQL 5.7 Community Server -  disabled
mysql80-community/x86_64           MySQL 8.0 Community Server    enabled:    343
mysql80-community-source           MySQL 8.0 Community Server -  disabled
# yum install -y mysql-community-server mysql-community-client
linux/centos7.txt · 最后更改: 2022/05/20 10:17 由 admin