文档章节

Fedora25安装配置mysql

南寻
 南寻
发布于 2017/02/14 20:32
字数 462
阅读 98
收藏 0

1.切换到root用户

su -
## OR ##
sudo -i

2.安装mysql的yum源

## Fedora 25 ##
dnf install https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm

## Fedora 24 ##
dnf install https://dev.mysql.com/get/mysql57-community-release-fc24-9.noarch.rpm

## Fedora 23 ##
dnf install https://dev.mysql.com/get/mysql57-community-release-fc23-9.noarch.rpm

3.安装mysql 5.7.17

Fedora 25/24/23


dnf install mysql-community-server

4.设置开机启动mysql服务

systemctl start mysqld.service ## use restart after update

systemctl enable mysqld.service

5.设置一个root用户随机密码,用来登陆mysql修改密码

grep 'A temporary password is generated for root@localhost' /var/log/mysqld.log |tail -1

Example Output:

2015-11-20T21:11:44.229891Z 1 [Note] A temporary password is generated for root@localhost: -et)QoL4MLid

6.修改密码

使用这个命令

/usr/bin/mysql_secure_installation

输出

Securing the MySQL server deployment.

Enter password for user root: 
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.

Estimated strength of the password: 100 
Change the password for root ? ((Press y|Y for Yes, any other key for No) : Y

New password: 

Re-enter new password: 

Estimated strength of the password: 100 
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : 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? (Press y|Y for Yes, any other key for No) : Y
Success.

By default, MySQL 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? (Press y|Y for Yes, any other key for No) : 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? (Press y|Y for Yes, any other key for No) : Y
Success.

All done! 

7.可以连接到mysql了

mysql -u root -p

## OR ##
mysql -h localhost -u root -p

© 著作权归作者所有

共有 人打赏支持
南寻
粉丝 64
博文 90
码字总数 35772
作品 0
朝阳
程序员
私信 提问
[openstack]proxy后devstack方式安装openstack

可能很多公司有内部防火墙,访问外网需要通过proxy。 下文主要介绍这种情况下,如何devstack方式安装哦盆stack。 希望对大家有帮助,我使用的ocata版本的openstack。 1. 配置host的dns,需要...

halcyonbaby
2017/04/24
0
0
virtualbox 安装centos7 配置桥接网卡,实现主机和虚拟机互通,虚拟机可以访问外网,解决无法上网问题

观看视频 1. virtualbox快速搭建虚拟机   centos7-mini,配置桥接网络,实现和主机互通,虚拟机可以访问外网 链接: https://pan.baidu.com/s/1dE5EYnn 密码: efds 2.virtualbox快速复制虚拟...

landebug
2017/05/08
0
0
fedora25 U盘安装

新下的fedoras25 U盘为啥U盘安装失败 试了软碟通 ,poweriso liveUSB-Creator 都试过

jaakan
2017/01/10
322
2
Fedora 25 Workstation 安装指南

导读 在这篇教程中,我们将会走完在电脑上安装 Fedora 25 workstation 的每一步。该指南包括整个安装过程中的每一步截图,因此,请认真跟着操作。 Fedora 25 Workstation 新特性 正如大家所期...

linux小陶
2016/12/21
62
0
Windows下通过MySQL Installer安装MySQL服务

MYSQL官方提供了Installer方式安装MYSQL服务以及其他组件,使的Windows下安装,卸载,配置MYSQL变得特别简单。 1. 安装准备 1.1 准备MySQL安装包 百度云盘共享安装包下载 密码:jmj2 window...

secondriver
06/26
0
0

没有更多内容

加载失败,请刷新页面

加载更多

搬瓦工DC3机房和DC8机房哪个速度快,应该选哪个?

搬瓦工DC3机房和DC8机房都是搬瓦工CN2,那么这两个机房比较哪个机房速度快?搬瓦工DC3机房和DC8机房应该选择哪个机房?移动用户用DC8机房还是DC3机房?联通用DC3还是DC8快?电信应该选DC3还是...

Alanbrooke
30分钟前
1
0
探秘Runtime - Runtime介绍

该文章属于<简书 — 刘小壮>原创,转载请注明: <简书 — 刘小壮> https://www.jianshu.com/p/ce97c66027cd Runtime是iOS系统中重要的组成部分,面试也是必问的问题,所以Runtime是一个iOS工...

刘小壮
32分钟前
1
0
图形用户界面和交互输入方法---小结

中国龙-扬科
48分钟前
1
0
当程序员有了中年危机 你会发现你就是个屁

前言 程序员是一个怎样的存在?引用一句鸡汤的名言来说:你以为你用双手改变了世界,实际上是苍老了自己。为什么我今天会抛出这个话题,其实我也是一个懵懂的少年,我也曾经为了成为一名程序...

架构师springboot
58分钟前
13
0
大型网站B2C商城项目实战+MongoDB+Redis+zookeeper+MySQL

本文列出了当今计算机软件开发和应用领域最关键部分,如果你想保证你现在以及未来的几年不失业,那么你最好跟上这些技术的发展。虽然你不必对这十种技术样样精通,但至少应该对它们非常熟悉。...

java知识分子
59分钟前
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部