ubuntu系统 安装 mysql 5.7版本和redis

mysql 5.7

  1. 直接在终端输入
sudo apt insall -y mysql-server-5.7

2.修改密码

1.升级的mysql5.7修改完root账户密码后仍然无法登陆,查阅资料可能和user表的plugin 字段为空有关。

2.需要在mysql 配置文件[mysqld]节点上加  skip-grant-tables

3.重启服务
  sudo service mysql restart

4. 使用mysql 登录

5.登录之后查询plugin字段值
  select plugin from user where user = 'root';

6.更新plugin字段
  update user set plugin='mysql_native_password';

7.修改密码
  update user set authentication_string=password('123456') where user='root' and host='localhost';

8.刷新
flush privileges;

9.删除skip-grant-tables

10.重启mysql服务

redis 安装

 sudo apt install redis
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容