原创
Centos7安装Nginx和MySQL8
温馨提示:
本文最后更新于 2019年01月09日,已超过 2,157 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我。
Centos7安装Nginx
yum install -y epel-release
yum install -y nginx
systemctl enable nginx
systemctl start nginx
systemctl status nginx
[root@lzhpo-light nginx]# pwd
/etc/nginx
[root@lzhpo-light nginx]# vi nginx.conf
Centos7安装MySQL8
# 下载MySQL yum源(https://dev.mysql.com/downloads/repo/yum/)
wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
# 安装yum源
yum localinstall -y mysql80-community-release-el7-1.noarch.rpm
# 更新yum源
yum clean all
yum makecache
# 开始安装MySQL
yum install -y mysql-community-server
# 设置开机自启MySQL
systemctl start mysqld
# 查看初始化密码
cat /var/log/mysqld.log | grep password
mysql -u root -p
mysql > use mysql;
# 报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
# 解决办法(设置低级密码)
SET GLOBAL validate_password.policy=0;
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
mysql > FLUSH PRIVILEGES;
mysql> update user set host='%' where user='root';
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
mysql > FLUSH PRIVILEGES;
- 本文标签: Linux
- 本文链接: http://www.lzhpo.com/article/96
- 版权声明: 本文由lzhpo原创发布,转载请遵循《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权