Linux 安装mysql 数据库

一下为mysql 安装教程

Using username"root".

Last login: Tue Oct8 09:30:34 2019 from 113.98.245.93Welcome to Alibaba Cloud Elastic Compute Service![root@lwh~]# yum list installed mysql*已加载插件:fastestmirror, langpacks

Loading mirror speeds from cached hostfile

错误:没有匹配的软件包可以列出

[root@lwh~]# yum localinstall mysql57-community-release-el7-8.noarch.rpm

已加载插件:fastestmirror, langpacks

无法打开 mysql57-community-release-el7-8.noarch.rpm ,跳过。

无须任何处理

[root@lwh~]# cd /root

[root@lwh~]#wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch. rpm

--2019-10-08 09:40:16-- http://repo.mysql.com/mysql57-community-release-el7-8.n oarch.rpm

正在解析主机 repo.mysql.com (repo.mysql.com)... 104.127.195.16正在连接 repo.mysql.com (repo.mysql.com)|104.127.195.16|:80... 已连接。

已发出 HTTP 请求,正在等待回应...200OK

长度:9116 (8.9K) [application/x-redhat-package-manager]

正在保存至: “mysql57-community-release-el7-8.noarch.rpm”100%[======================================>] 9,116 --.-K/s 用时 0s2019-10-08 09:40:16 (118 MB/s) - 已保存 “mysql57-community-release-el7-8.noarch. rpm” [9116/9116])

[root@lwh~]#rpm -ivh mysql57-community-release-el7-8.noarch.rpm

准备中... ################################# [100%]

正在升级/安装...1:mysql57-community-release-el7-8 ################################# [100%]

[root@lwh~]#cd /etc/yum.repos.d/[root@lwh yum.repos.d]# ls

CentOS-Base.repo CentOS-Media.repo mysql-community.repo

CentOS-CR.repo CentOS-Sources.repo mysql-community-source.repo

CentOS-Debuginfo.repo CentOS-Vault.repo

CentOS-fasttrack.repo epel.repo

[root@lwh yum.repos.d]# yum install mysql-server

已加载插件:fastestmirror, langpacks

Loading mirror speeds from cached hostfile

mysql-connectors-community | 2.5 kB 00:00mysql-tools-community | 2.5 kB 00:00mysql57-community | 2.5 kB 00:00正在解决依赖关系-->正在检查事务---> 软件包 mysql-community-server.x86_64.0.5.7.27-1.el7 将被 安装--> 正在处理依赖关系 mysql-community-common(x86-64) = 5.7.27-1.el7,它被软件包 m ysql-community-server-5.7.27-1.el7.x86_64 需要--> 正在处理依赖关系 mysql-community-client(x86-64) >= 5.7.9,它被软件包 mysql-c ommunity-server-5.7.27-1.el7.x86_64 需要-->正在检查事务---> 软件包 mysql-community-client.x86_64.0.5.7.27-1.el7 将被 安装--> 正在处理依赖关系 mysql-community-libs(x86-64) >= 5.7.9,它被软件包 mysql-com munity-client-5.7.27-1.el7.x86_64 需要---> 软件包 mysql-community-common.x86_64.0.5.7.27-1.el7 将被 安装-->正在检查事务---> 软件包 mysql-community-libs.x86_64.0.5.7.27-1.el7 将被 安装-->解决依赖关系完成

依赖关系解决================================================================================Package 架构 版本 源 大小================================================================================正在安装:

mysql-community-server x86_64 5.7.27-1.el7 mysql57-community 165M

为依赖而安装:

mysql-community-client x86_64 5.7.27-1.el7 mysql57-community 24M

mysql-community-common x86_64 5.7.27-1.el7 mysql57-community 275k

mysql-community-libs x86_64 5.7.27-1.el7 mysql57-community 2.2M

事务概要================================================================================安装1 软件包 (+3依赖软件包)

总下载量:192M

安装大小:865M

Isthis ok [y/d/N]: y

Downloading packages:

(1/4): mysql-community-common-5.7.27-1.el7.x86_64.rpm | 275 kB 00:00(2/4): mysql-community-libs-5.7.27-1.el7.x86_64.rpm | 2.2 MB 00:00(3/4): mysql-community-client-5.7.27-1.el7.x86_64.rpm | 24 MB 00:02(4/4): mysql-community-server-5.7.27-1.el7.x86_64.rpm | 165 MB 00:00:47

------------------------------------------------------------------------------------------------------------------------------------------------------------------------总计4.0 MB/s | 192 MB 00:00:48Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

警告:RPM 数据库已被非 yum 程序修改。** 发现 1 个已存在的 RPM 数据库问题, 'yum check'输出如下:

python-requests-2.6.0-5.el7.noarch 有缺少的需求 python-urllib3 >= ('0', '1.10.2', '1')

正在安装 : mysql-community-common-5.7.27-1.el7.x86_64 1/4正在安装 : mysql-community-libs-5.7.27-1.el7.x86_64 2/4正在安装 : mysql-community-client-5.7.27-1.el7.x86_64 3/4正在安装 : mysql-community-server-5.7.27-1.el7.x86_64 4/4验证中 : mysql-community-client-5.7.27-1.el7.x86_64 1/4验证中 : mysql-community-common-5.7.27-1.el7.x86_64 2/4验证中 : mysql-community-libs-5.7.27-1.el7.x86_64 3/4验证中 : mysql-community-server-5.7.27-1.el7.x86_64 4/4已安装:

mysql-community-server.x86_64 0:5.7.27-1.el7

作为依赖被安装:

mysql-community-client.x86_64 0:5.7.27-1.el7 mysql-community-common.x86_64 0:5.7.27-1.el7 mysql-community-libs.x86_64 0:5.7.27-1.el7

完毕!

[root@lwh yum.repos.d]# mysql-V

mysql Ver14.14 Distrib 5.7.27, forLinux (x86_64) using EditLine wrapper

[root@lwh yum.repos.d]#service mysqld start

Redirecting to/bin/systemctl start mysqld.service

[root@lwh yum.repos.d]# service mysqld status

Redirecting to/bin/systemctl status mysqld.service

● mysqld.service-MySQL Server

Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor prese t: disabled)

Active: active (running) since 二2019-10-08 09:53:29CST; 12s ago

Docs: man:mysqld(8)

http://dev.mysql.com/doc/refman/en/using-systemd.html

Process: 1397 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysql d/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)

Process:1291 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

Main PID:1400(mysqld)

Tasks:27CGroup:/system.slice/mysqld.service

└─1400 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mys...

10月08 09:53:21 lwh systemd[1]: Starting MySQL Server...

10月08 09:53:29 lwh systemd[1]: Started MySQL Server.

[root@lwh yum.repos.d]# grep"password" /var/log/mysqld.log2019-09-27T02:54:37.514492Z 1 [Note] A temporary password is generated for root@ localhost: dM/+;gxtx5u&

2019-09-27T02:56:51.941440Z 2 [Note] Access denied for user 'root'@'localhost'( using password: YES)2019-09-27T07:13:29.544662Z 0 [Note] Shutting down plugin 'validate_password'

2019-09-27T07:13:30.919751Z 0 [Note] Shutting down plugin 'sha256_password'

2019-09-27T07:13:30.919754Z 0 [Note] Shutting down plugin 'mysql_native_passwor '

2019-09-27T07:14:15.493803Z 0 [Note] Shutting down plugin 'validate_password'

2019-09-27T07:14:16.901327Z 0 [Note] Shutting down plugin 'sha256_password'

2019-09-27T07:14:16.901330Z 0 [Note] Shutting down plugin 'mysql_native_passwor '

2019-09-27T07:17:53.235441Z 0 [Note] Shutting down plugin 'validate_password'

2019-09-27T07:17:54.481004Z 0 [Note] Shutting down plugin 'sha256_password'

2019-09-27T07:17:54.481008Z 0 [Note] Shutting down plugin 'mysql_native_passwor '

2019-09-27T07:19:43.334368Z 2 [Note] Access denied for user 'root'@'localhost'( using password: NO)2019-09-27T07:24:01.586076Z 3 [Note] Access denied for user 'root'@'localhost'( using password: YES)2019-09-27T07:38:25.108093Z 0 [Note] Shutting down plugin 'validate_password'

2019-09-27T07:38:26.832129Z 0 [Note] Shutting down plugin 'sha256_password'

2019-09-27T07:38:26.832133Z 0 [Note] Shutting down plugin 'mysql_native_passwor '

2019-09-27T07:44:06.256534Z 3 [Note] Access denied for user 'root'@'localhost'( using password: NO)2019-09-27T08:20:25.906079Z 2 [Warning] Plugin validate_password reported: 'Effe ctive value of validate_password_length is changed. New value is 4'

2019-09-29T01:17:21.691602Z 4 [Note] Access denied for user 'root'@'localhost'( using password: YES)2019-09-29T02:57:47.686866Z 0 [Note] Shutting down plugin 'validate_password'

2019-09-29T02:57:49.286496Z 0 [Note] Shutting down plugin 'sha256_password'

2019-09-29T02:57:49.286499Z 0 [Note] Shutting down plugin 'mysql_native_passwor '

2019-10-08T01:53:25.842666Z 1 [Note] A temporary password is generated for root@ localhost: jN2+I2R8KiIk

[root@lwh yum.repos.d]# mysql-uroot -p'jN2+I2R8KiIk'mysql: [Warning] Using a password on the command lineinterfacecan be insecure.

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is2Server version:5.7.27Copyright (c)2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type'help;' or '\h' for help. Type '\c'to clear the current input statement.

mysql>mysql> SET PASSWORD = PASSWORD('passw0rd');

ERROR1819(HY000): Your password does not satisfy the current policy requirements

mysql> set global validate_password_policy=0;

Query OK,0 rows affected (0.00sec)

mysql> SET PASSWORD = PASSWORD('passw0rd'); --设定mysql密码

Query OK,0 rows affected, 1 warning (0.00sec)

mysql>ALTER USER 'root'@'localhost'PASSWORD EXPIRE NEVER; --设定用户下的密码永久生效,不过期

Query OK,0 rows affected (0.00sec)

mysql>flush privileges; --以上命令即时生效

Query OK,0 rows affected (0.00sec)

mysql>grant all privileges on *.* to root@"%" identified by "passw0rd"; --允许其他任意机主登录mysql数据库

Query OK,0 rows affected, 1 warning (0.00sec)

mysql> grant all privileges on *.* to root@"localhost" identified by "passw0rd"; --允许其他任意主机登录mysql数据库Query OK, 0 rows affected, 1 warning (0.00sec)

阿里云安装数据库mysql数据库服务器_阿里云CentOs服务器 安装与配置mysql数据库...相关推荐

  1. 阿里云mysql数据库在哪里看_阿里云服务器数据库信息在哪查看

    阿里云服务器数据库信息在哪查看,阿里云自己安装数据库. 对于大多数小型或初期项目来说,我们可能常用的做法是先将web.数据库全部安装在一起,后期根据需要来看是否将数据库单独迁移分离.传统物理服务器可以 ...

  2. 阿里云查看mysql数据库密码是多少_阿里云服务器查看数据库密码是多少

    全网最新活动请看下方内容或右侧内容! --------------- 阿里云服务器查看数据库密码是多少,阿里云开源数据库. 在阿里云ecs云服务器上部署数据库后,在平常的操作中可能会遇到些问题,可以先 ...

  3. 阿里云的mysql主机名_阿里云的数据库主机名是什么

    全网最新活动请看下方内容或右侧内容! --------------- 阿里云的数据库主机名是什么,阿里云怎么建数据库. 在阿里云ecs云服务器上部署数据库后,在平常的操作中可能会遇到些问题,可以先做个 ...

  4. 获取阿里云mysql实例名称_阿里云如何获取数据库名字

    全网最新活动请看下方内容或右侧内容! --------------- 阿里云如何获取数据库名字,阿里云服务器回滚数据库. 对于大多数小型或初期项目来说,我们可能常用的做法是先将web.数据库全部安装在 ...

  5. 阿里云mysql密码多少_阿里云默认数据库密码是多少

    阿里云默认数据库密码是多少,阿里云ecs建数据库. 对于大多数小型或初期项目来说,我们可能常用的做法是先将web.数据库全部安装在一起,后期根据需要来看是否将数据库单独迁移分离.传统物理服务器可以这么 ...

  6. 阿里云rds for mysql平台介绍_阿里云RDS for MySQL 快速入门——笔记

    1初始化配置 1.1设置白名单 创建RDS实例后,需要设置RDS实例的白名单,以允许外部设备访问该RDS实例.默认的白名单只包含默认IP地址127.0.0.1,表示任何设备均无法访问该RDS实例. 设 ...

  7. wamserver怎么把mysql找回来_将php连接wampserver自带的MySQL数据库 所遇到各种问题解决办法...

    将php连接到MySQL数据库的方法有很多,在这里我使用的是mysqli_connect方法, 此博客所解答的问题汇总: 1.wampserver服务器离线但图标为正常绿: 2.wampserver ...

  8. 二级mysql教程下载_全国计算机等级考试教程:二级MySQL数据库程序设计

    第一章 数据库技术的基本概念与方法 1.1 基本概念 1.2 数据库系统的特点 1.3 数据库系统的结构 1.3.1 数据库系统的三级模式结构 1.3.2 三级模式结构的两层映像与两级数据独立性 1. ...

  9. mycat定时向mysql存储数据_【实战演练】Linux操作系统20-MyCat实现Mysql数据库读写分离与自动切换...

    #本文欢迎转载,转载请注明出处和作者. 理论部分,详见:繁星亮与鲍包包:[理论研究]业务系统高可用及负载均衡​zhuanlan.zhihu.com 本篇主要实现"8.Mysql读写分离&qu ...

最新文章

  1. 何凯明团队又出新论文!北大、上交校友教你用ViT做迁移学习
  2. GhostNet : 轻量级网络模型,性能超越MobileNetV3(CVRP2020, 华为诺亚)
  3. CTO下午茶: 没有安全,一切创新都是套路
  4. SpringMVC连接多数据源配置
  5. python删除excel内容_用python批量删除sheet
  6. iOS音乐后台播放及锁屏信息显示
  7. 优云数智UMCloud CTO王璞:IaaS+PaaS驱动私有云未来十年
  8. Linux系统调用怎么和内核或底层驱动交互的 inode struct file
  9. 标准误计算机excel公式,excel标准误差怎么算
  10. Windows CMD命令大全
  11. spring-quartz表达式介绍
  12. 上门洗车小程序/APP功能介绍
  13. unity3d 取锚点位置_《王者荣耀》破晓之心碎片在哪 破晓之心碎片位置介绍
  14. SEO词汇表:您应该知道的180多个术语和定义
  15. Python爬虫编程思想(70): 项目实战--抓取京东商城手机销售排行榜
  16. Python安装包,官网下载太慢解决方法:淘宝国内镜像
  17. linux仿真电路指令,使用geda进行电路仿真举例
  18. 非华为电脑安装华为电脑管家实现多屏协同
  19. 南山中集集团Java面试_中集集团面试经验
  20. windows下mysql 导入employees.sql步骤

热门文章

  1. 如何看待人工智能技术的变革与未来?
  2. hash % n 为什么等于 (n - 1) hash
  3. mega-nerf安装流程
  4. 网络虚拟化之virtio-net和vhost
  5. (转)关于无良培训机构的恶意抹黑疯狂Java的反驳(v2)
  6. c++入门必学算法 并查集
  7. ChatPDF,PDF操作一键完成!
  8. 解析几何:第二章 解析几何中的基本计算公式
  9. 哈希开链法详解c++
  10. ASCII - 美国标准信息交换代码