赞
踩
wge https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
sudo rpm -Uvh mysql80-community-release-el7-3.noarch.rpm
报错:
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
失败:error: https://repo.mysql.com/RPM-GPG-KEY-mysql-2022: import read failed(2).
wge -q -O - https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | apt-key add -
失败:-bash: apt-key: command not found
命令:wge -q -O - https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 > RPM-GPG-KEY-mysql
sudo service mysqld status\status\stop
MySQL第一次启动后会创建超级管理员账号root@localhost,初始密码存储在日志文件中:
grep ‘temporary password’ /var/log/mysqld.log
1、GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root@MySQL2022' WITH GRANT OPTION;
2、FLUSH PRIVILEGES;
执行命令报错:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
则先修改初始化密码
ALTER USER USER() IDENTIFIED BY 'Admin2023';
SHOW VARIABLES LIKE 'character%';
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。