在CentOS 7上安装MySQL时遇到错误:
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022"
需要先运行下面的命令
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
再次执行MySQL的安装命令
yum install mysql-community-server
systemctl start mysqld
systemctl status mysqld
systemctl restart mysqld
开机启动
systemctl enable mysqld
systemctl daemon-reload