CentOS yum安装mysql8
发布时间: 2022-9-6
文章作者: myluzh
分类名称: MySQL
朗读文章
官网地址:https://dev.mysql.com/downloads/repo/yum/
可以在以上地址选择想要的版本将下面的链接后面部分替换
替换地址
wget http://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm
rpm -ivh mysql80-community-release-el7-3.noarch.rpm
yum update
安装:
yum install mysql-server
初始化:
mysqld --initialize
权限设置:
chown mysql:mysql -R /var/lib/mysql
启动mysql:
systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld
查看mysql8安装后的初始密码
grep "A temporary password" /var/log/mysql/mysqld.log
登录mysql
mysql -u root
刷新权限
flush privileges;
修改密码
alter user 'root'@'localhost'IDENTIFIED BY '你的新密码,大写小写符号组合';
标签: centos mysql8 yum
手机扫一扫访问
发表评论