最新文章专题视频专题关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
如何打开dwf格式的文件 mysql忘记了root用户密码怎么办 rhce官方培训价格多少 mysql安装教程5.0 mysqlroot登陆密码忘记了怎么办 如何创建自己的网站 mysql安装教程linux mysql的root密码忘记了怎么办 手机充电发烫是什么原因 修改mysqlroot密码 微信封号违规是什么原因 mysql5.7linux安装教程 mysql用root密码忘记了怎么办 删除微信零钱明细怎么恢复 mysql5.7修改root密码 mysql包安装教程 微信账号风险评估在哪里看 mysql设置root密码忘记了怎么办 如何在ps中添加文字 linuxmysql修改root密码 cad制图图形界限怎么设置 忘记了mysqlroot密码怎么办 数据库mysql安装教程 mysql安装教程视频 mysql5.0安装教程 rpm安装命令用法 mysql修改root密码 mysql忘记root密码怎么办 mysql安装教程 find命令技巧 红帽初中级认证考试费用 红帽认证工程师考试费用 linux初级证书多少钱 红帽linux认证费用 红帽初级认证考试费用 redhat证书考试多少钱 红帽认证考试多少钱 红帽认证多少钱 linux认证多少钱 linux认证考试多少钱
当前位置: 首页 - 科技 - 知识百科 - 正文

最新mysql安装教程

来源:懂视网 责编:小采 时间:2020-11-22 12:11:29
文档

最新mysql安装教程

mysql安装首先使用yum安装mysql数据库的软件包 ;然后启动数据库服务并运行mysql_secure_installation去除安全隐患,最后登录数据库,完成安装。
推荐度:
导读mysql安装首先使用yum安装mysql数据库的软件包 ;然后启动数据库服务并运行mysql_secure_installation去除安全隐患,最后登录数据库,完成安装。

视频内容

产品型号:Thinkpad E15

系统版本:centos7

软件版本:mysql 5.7

mysql安装教程

1.使用yum安装mysql数据库的软件包 

[root@xuegod63 ~]# yum -y install mariadb-server mariadb 

注:  

mariadb-server  #MariaDB数据库 

mariadb      # MariaDB服务器Linux下客户端 

注:从centos7系统开始,系统中自带的mysql数据库变成了mariadb-server,mariadb-server和mysql操作上一样。mariadb-server是mysql的一个分支。

2.启动数据库服务

[root@xuegod63 ~]# systemctl start  mariadb #启动MariaDB服务

[root@xuegod63 ~]# systemctl enable  mariadb #设置开启自动启动MariaDB服务

3. 安装完mariadb-server后,运行mysql_secure_installation去除安全隐患

[root@xuegod63 ~]# mysql_secure_installation #进入安全配置导向

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current

password for the root user. If you've just installed MySQL, and

you haven't set the root password yet, the password will be blank,

so you should just press enter here.

Enter current password for root (enter for none):  #初次运行直接回车,因为root用户没有密码

OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL

root user without the proper authorisation.

Set root password? [Y/n] Y #是否设置root用户密码,输入Y

New password: 123456  #新密码123456

Re-enter new password: 123456

Password updated successfully!

。。。

Remove anonymous users? [Y/n] Y  #是否删除匿名用户,生产环境建议删除,所以直接回车或Y

 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This

ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y #是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止

 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can

access.  This is also intended only for testing, and should be removed

before moving into a production environment.

Remove test database and access to it? [Y/n] Y  #是否删除test数据库,直接回车或Y

 - Dropping test database...

 ... Success!

 - Removing privileges on test database...

 ... Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n] Y  #是否重新加载权限表,直接回车

 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

… Success!

至此数据库安装成功。

4. 登录数据库

[root@xuegod63 ~]# mysql -u root -p123456 

MariaDB [(none)]> show databases;    #没有test数据库 #执行时,所有命令以;号结尾 

+-------------------------+ 

| Database

+-------------------------+ 

| information_schema

| mysql

| ucenter

+-------------------------+ 

3 rows in set (0.00 sec) 

MariaDB [(none)]> exit #退出命令可以加分号,也可以不加分号。

总结:

1、使用yum安装mysql数据库的软件包 

2、启动数据库服务

3、运行mysql_secure_installation去除安全隐患

4、登录数据库

声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:0731-84117792 E-MAIL:11247931@qq.com

文档

最新mysql安装教程

mysql安装首先使用yum安装mysql数据库的软件包 ;然后启动数据库服务并运行mysql_secure_installation去除安全隐患,最后登录数据库,完成安装。
推荐度:
标签: 方法 安装 教程
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题软文怎么发软文怎么发专题如何写软文如何写软文专题活动软文怎么写活动软文怎么写专题rhca培训多少钱rhca培训多少钱专题rhcsa培训多少钱rhcsa培训多少钱专题linux分区方法linux分区方法专题linux磁盘分区方法linux磁盘分区方法专题apache安装方法apache安装方法专题apache和nginx的区别apache和nginx的区别专题docker命令教程docker命令教程专题 linux安装nginx方法 linux安装nginx方法专题nginx反向代理配置nginx反向代理配置专题nginx负载均衡策略nginx负载均衡策略专题nginx负载均衡配置nginx负载均衡配置专题nginx配置文件详解nginx配置文件详解专题nginx是什么nginx是什么专题nginx重启方法nginx重启方法专题安装docker步骤安装docker步骤专题安装docker教程安装docker教程专题docker进入容器的命令docker进入容器的命令专题docker镜像制作方法docker镜像制作方法专题docker删除镜像的方法docker删除镜像的方法专题docker删除容器的方法docker删除容器的方法专题启动docker命令启动docker命令专题重启docker的方法重启docker的方法专题怎么使用vlookup函数匹配怎么使用vlookup函数匹配专题喜马拉雅下载的音频怎么变成mp3喜马拉雅下载的音频怎么变成mp3专题微博点赞后取消对方知道吗微博点赞后取消对方知道吗专题手机连不上wifi怎么办手机连不上wifi怎么办专题什么叫软文什么叫软文专题mysql视频教程那个好专题mysql 入门课程专题mysql 存储引擎有几种专题mysql安装指南专题mysql基础与实例教程专题mysql 教学视频专题python教程读取数据库专题mysql案例教程专题mysql环境配置教程专题mysql 优化教程专题mysql教程 php专题mysql函数教程专题sql 安装教程专题sql的安装教程专题python3 mysql教程专题sql 库安装教程专题mysql入门基础教程专题mysql5.5教程专题mysql5.7.20安装教程图解专题mysql下载安装教程5.7.30专题
Top