记录技术收获,分享个人心得

人生如负重远行,不可急于求成

Centos8纯净版安装Mysql8.0

记录纯净版的centos8安装mysql8的流程,直接使用yum操作,命令流程

1、yum update -y

《Centos8纯净版安装Mysql8.0》

2、yum install mysql -y

《Centos8纯净版安装Mysql8.0》

3、yum install mysql-server -y

《Centos8纯净版安装Mysql8.0》

4、启动mysql服务

(1)systemctl list-unit-files | grep mysql查看mysql服务是否在启动项列表中

《Centos8纯净版安装Mysql8.0》

(2)systemctl enable mysqld.service 输入将mysql服务设置为默认自启动状态

《Centos8纯净版安装Mysql8.0》
# Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service → /usr/lib/systemd/system/mysqld.service.
(3)再查看mysql已经是enable的状态,输入service mysqld start启动mysql服务(也可使用命令systemctl start mysqld.service 更有centos7以上的内味儿)

《Centos8纯净版安装Mysql8.0》

5、设置root密码

(1)直接输入mysql命令进入mysql终端

(2)ALTER USER ‘root’@localhost IDENTIFIED BY ‘root密码’ ;

   《Centos8纯净版安装Mysql8.0》

设置了root密码后就可以操作后续的新建数据库,新建用户了。over~

新建用户语句

>create user ‘用户名’@’主机’ identified by ‘密码’;

>grant all privileges on *.* to ‘用户名’@’主机’;

>quit


点赞

发表评论

邮箱地址不会被公开。 必填项已用*标注

hi~

你好,欢迎来到我的博客,欢迎留言。

快速搜索:





Generic selectors

Exact matches only


Search in title


Search in content



Search in posts


Search in pages

欢迎关注我:

微博
steam
网易云音乐
QQ
500px

常用命令:

http://www.gaoshan.me/cmd