mysql8.0.25安装

2022/1/6 2:07:48

本文主要是介绍mysql8.0.25安装,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1.下载mysql-8.0.25-1.el7.x86_64.rpm-bundle

2.卸载mariadb

3.安装

yum localinstall mysql-community-common-8.0.25-1.el7.x86_64.rpm

yum localinstall mysql-community-client-plugins-8.0.25-1.el7.x86_64.rpm

yum localinstall mysql-community-libs-8.0.25-1.el7.x86_64.rpm

yum localinstall mysql-community-client-8.0.25-1.el7.x86_64.rpm

yum localinstall mysql-community-server-8.0.25-1.el7.x86_64.rpm

4.初始化

mysqld --initialize 

 chown mysql:mysql /var/lib/mysql -R 授权 5.启动 systemctl start mysqld 开启mysql服务 systemctl status mysqld 查看mysql 状态   6.通过cat /var/log/mysqld.log | grep password 查看root初始密码   7.使用root用户登录mysql ,并修改root用户密码  
  mysql -u root -p #回车之后输入前面的初始密码也就是 上面查看的初始密码(填自己的密码)
  然后输入alter user "root"@"localhost" identified by "123456"; #修改密码(Aa123456 为自己设的密码可随意变换)

  

8.通过以下命令,进行远程访问的授权

create user 'root'@'%' identified with mysql_native_password by 'Aa23456'; 
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges; #立即生效  

9.远程连接



这篇关于mysql8.0.25安装的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程