视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
mysql的root密码忘记了怎么办 手机充电发烫是什么原因 修改mysqlroot密码 微信封号违规是什么原因 mysql5.7linux安装教程 mysql用root密码忘记了怎么办 删除微信零钱明细怎么恢复 mysql5.7修改root密码 mysql包安装教程 微信账号风险评估在哪里看 mysql设置root密码忘记了怎么办 如何在ps中添加文字 linuxmysql修改root密码 qq找公众号在哪里找 mysql安装教程5.5 忘记mysqlroot密码怎么办 电脑管理员名字怎么改win10 mysql修改root密码5.7 linuxmysql安装教程 黑名单打电话会提示什么 如何创建自己的网站 mysqlroot登陆密码忘记了怎么办 mysql安装教程5.0 rhce官方培训价格多少 mysql忘记了root用户密码怎么办 如何打开dwf格式的文件 最新mysql安装教程 cad制图图形界限怎么设置 忘记了mysqlroot密码怎么办 数据库mysql安装教程 mysql安装教程视频 mysql5.0安装教程 rpm安装命令用法 mysql修改root密码 mysql忘记root密码怎么办 mysql安装教程 find命令技巧 红帽初中级认证考试费用 红帽认证工程师考试费用 linux初级证书多少钱
最新文章专题视频专题关键字专题TAG最新视频文章视频文章2视频2tag2tag3文章专题问答问答2 文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3

mysql安装教程linux

产品型号: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、登录数据库

安装 教程 安装包
专题软文怎么发软文怎么发专题如何写软文如何写软文专题活动软文怎么写活动软文怎么写专题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怎么办专题什么叫软文什么叫软文专题linux下载mysql步骤专题linux数据库管理专题linux系统如何连接数据库专题linux数据库配置专题linux数据库同步专题mysql linux使用专题linux下使用mysql专题linux如何连接mysql数据库专题linux mysql命令大全专题mysql连接 linux专题mysqllinux命令专题linuxmysql命令专题linux命令mysql专题linux下连接mysql专题linux mysql 设置专题linux系统mysql命令专题linux mysql 可视化工具专题linuxmysql登录命令专题linux上装mysql专题linux按照mysql专题