CentOS 7 安装 MySql 8

1-安装 CentOS 7
 
2-安装 NETCORE SDK  
  
   安装命令:
     sudo yum update
     sudo yum install dotnet-sdk-2.2
3-安装OPENSSL 
    yum install openssl
    yum install openssl-devel
 
4-更新 wget 
    PS:有些系统自带的WGET 不支持 https 协议
  4.1 下载 wget:
  4.2 卸载自带wget: 
      yum remove -y wget
 4.3 安装依赖
           yum install -y openssl-devel  
 4.4 解压安装包 并安装
           tar xvf wget-1.20.1.tar.gz
     cd wget-1.20.1
           ./configure --prefix=/usr --sysconfdir=/etc --with-ssl=openssl
      make && make install
 
5.1 安装 MySql
      
     下载 
      安装
 
         两次进行yum -y install mysql mysql-server mysql-devel,安装成功。再次使用该命令
初始化密码: mysqld --initialize --user=mysql
      查看初始化密码:grep ‘temporary password‘ /var/log/mysqld.log
 
      启动服务 service mysqld start
      查看状态 service mysqld status
     
      修改密码:ALTER user ‘root‘@‘localhost‘ IDENTIFIED BY ‘XXXX‘ (PS: 不需要flush privileges来刷新权限)
     添加用户:CREATE USER ‘lyra‘@‘%‘ IDENTIFIED BY ‘XXXX‘;
     用户授权:GRANT ALL PRIVILEGES ON *.* TO ‘lyra‘@‘%‘ WITH GRANT OPTION;
     授权NAVICAT客户端链接:ALTER USER ‘lyra‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘XXXXX‘; 
                                          FLUSH PRIVILEGES;

 

参考文档:

      https://www.cnblogs.com/suxiaoman/p/7693066.html

      https://www.cnblogs.com/hujiapeng/p/9124298.html

      https://blog.csdn.net/u012946310/article/details/81880050

相关文章
相关标签/搜索