• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
风吹花落泪如雨
博客园    首页    新随笔    联系   管理    订阅  订阅

Centos学习笔记(四)常用服务配置

一、Nginx配置

一、虚拟主机配置

1、配置文件

在nginx/nginx.conf文件里引入nginx/conf.d/*.conf

新建conf.d/myNgnix.conf文件

添加内容

2、修改hosts文件

3、 在本地windows电脑中修改host文件: c:\windows\system32\drivers\etc\hosts,增加一行

 

4、验证

二、伪静态的实现

1、增加一行rewrite

2、验证

三、反向代理

四、负载均衡

二、MySQL配置(5.8版本,与5.7些许命令不一致)

先设置开机启动:sudo chkconfig mysqld on

1、获取默认密码

2、登陆

mysql -uroot -pWAJ.nzlqkxdg

3、修改密码

修改密码规则:

    1.set global validate_password.policy=0;

    2.set global validate_password.length=1;

修改密码:alter user user() identified by '123456';

4、远程连接

use mysql;
select host,user from user where user='root'; # 查看host,正常情况,host=localhost
update user set host='%' where user='root' and host='localhost'; #更改用户名为root的账户,host为所有ip
select host,user from user where user='root'; # 查看更改,此时 host=%

FLUSH PRIVILEGES;

navicat连接:mysql8问题描述:

Error: 1251

Message: Client does not support authentication protocol requested by server; consider upgrading MySQL client

解决:

USE mysql;

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '你的数据库密码';

FLUSH PRIVILEGES;

 

posted @ 2018-12-23 16:09  风吹花落泪如雨  阅读(224)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3