[root@host---- home]# grep 'temporary password' /var/log/mysqld.log
--20T02::.457613Z [Note] A temporary password is generated for root@localhost: qAD44%hu?afp

[root@host---- home]# uname -a
Linux host---- 3.10.-.el7.x86_64 # SMP Fri Apr :: UTC x86_64 x86_64 x86_64 GNU/Linux
[root@host---- home]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID=""
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION=""
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION=""
[root@host---- home]# cat /etc/redhat-release
CentOS Linux release 7.5. (Core)

[root@host---- home]# rpm -qa | grep mysql
[root@host---- home]# rpm -qa | grep mariadb
mariadb-libs-5.5.-.el7.x86_64 [root@host---- home]# rpm -e --nodeps mariadb-libs-5.5.-.el7.x86_64
[root@host---- home]# rpm -qa | grep mariadb
[root@host---- home]# rpm -qa | grep mysql

[root@host---- home]# rpm -ivh mysql-community-common-5.7.-.el7.x86_64.rpm
warning: mysql-community-common-5.7.-.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [%]
Updating / installing...
:mysql-community-common-5.7.-.e################################# [%]
[root@host---- home]# rpm -ivh mysql-community-libs-5.7.-.el7.x86_64.rpm
warning: mysql-community-libs-5.7.-.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [%]
Updating / installing...
:mysql-community-libs-5.7.-.el7################################# [%]
[root@host---- home]# rpm -ivh mysql-community-client-5.7.-.el7.x86_64.rpm
warning: mysql-community-client-5.7.-.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [%]
Updating / installing...
:mysql-community-client-5.7.-.e################################# [%]
[root@host---- home]# rpm -ivh mysql-community-server-5.7.-.el7.x86_64.rpm
warning: mysql-community-server-5.7.-.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [%]
Updating / installing...
:mysql-community-server-5.7.-.e################################# [%]

systemctl start mysqld.service    //启动mysql
systemctl status mysqld.service //查看mysql状态
systemctl stop mysqld.service //关闭mysql [root@host---- home]# ps -ef | grep mysql
mysql : ? :: /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
root : pts/ :: grep --color=auto mysql
[root@host---- home]# netstat -nltp|grep
tcp6 ::: :::* LISTEN /mysqld

[root@host---- home]# grep 'temporary password' /var/log/mysqld.log
--20T02::.457613Z [Note] A temporary password is generated for root@localhost: qAD44%hu?afp
//使用如下命令登录数据库,输入上面查询到的密码:
[root@host---- ~]# mysql -u root -p //进入数据库,使用命令set password=password("Huawei12#$");修改数据库密码。

mysql> grant all privileges on *.* to root@"%" identified by "Huawei12#$";
Query OK, rows affected, warning (0.00 sec) mysql> flush privileges;
Query OK, rows affected (0.00 sec) //配置字符编码UTF-8
//vi /etc/my.cnf
#添加
[mysqld]
character_set_server=utf8
init_connect='SET NAMES utf8' 配置文件:/etc/my.cnf
日志文件:/var/log//var/log/mysqld.log
服务启动脚本:/usr/lib/systemd/system/mysqld.service
socket文件:/var/run/mysqld/mysqld.pid

CentOS7.5下,MySQL安装配置指南的更多相关文章

  1. ubuntu下MySQL安装配置及基本操作

    在linux下安装方法: 分为四种:一: 直接用软件仓库自动安装(如:ubuntu下,sudo apt-get install mysql-server; Debain下用yum安装): 二:官网下载 ...

  2. Centos 下mysql安装配置

    一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库 yum install gcc gcc-c++ ncurses-devel perl 安装cmake,从http://www.cmake ...

  3. centos7环境下mysql安装

    1.去官网下载合适的yum源安装包 https://dev.mysql.com/downloads/repo/yum/ 2.yum 本地安装 命令:yum localinstall mysql57-c ...

  4. Linux下MySQL 安装配置

    MySQL 是最流行的关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle公司. MySQL所使用的SQL语言是用于访问数据库的最常用标准化语言. MySQL由于其体积小.速度快 ...

  5. 【云计算】ubuntu下docker安装配置指南

    Docker Engine安装配置 以下描述仅Docker在Ubuntu Precise 12.04 (LTS).Ubuntu Trusty 14.04 (LTS).Ubuntu Wily 15.10 ...

  6. CentOS 7下MySQL安装配置

    安装: #centos 7 yum install -y mariadb mariadb-server mariadb-devel #debian 8 apt-get install nginx ma ...

  7. Win7和Ubuntu下mysql 安装配置

    Windows下安装 下载对应版本的mysql安装包安装,如果安装目录为 C:\Program Files\MySQL\MySQL Server 5.6 增加环境变量 MYSQL_HOME=C:\Pr ...

  8. Windows下MySQL安装配置与使用

    1.下载. 下载地址: http://downloads.mysql.com/archives/get/file/mysql-5.7.11-winx64.zip. NavicatforMySQL:ht ...

  9. CentOS7 minimal下MySQL安装

    http://www.linuxidc.com/Linux/2016-12/137942.htm 首先要使用root用户登录 卸载: 1.卸载原有程序 yum remove mysql mysql-s ...

随机推荐

  1. fonts/font-awesome-woff2 404问题

    报错环境: vue 开发的项目 npm 引入的font-awesome, 页面正常显示,就是控制台会报这个错误 产生原因:因为服务器IIS不认SVG,WOFF/WOFF2 这几个文件类型,只要在IIS ...

  2. 最简单之安装azkaban

    一,拉取源码构建 git clone https://github.com/azkaban/azkaban.git cd azkaban; ./gradlew build installDist 二, ...

  3. getSuperclass与getGenericSuperclass区别

    声明三个类class Person<T, V> {}class Teacher {}class Student extends Person<Student, Teacher> ...

  4. request.getParameterNames获得请求参数的名字(Get或者Post请求的参数都可以)

    1 protected Map<String, String> initRequestParams(HttpServletRequest request) { 2 Map<Strin ...

  5. 利用 canvas 实现压缩图片

    /** * nase64Data --> 要压缩的图片base64数据 * width --> 宽度 * height --> 高度 * _callback --> 回调函数 ...

  6. vue_03总结

    vue_03总结 1.组件: html.css.js的集合体 vue实例就代表组件 组件用template实例成员管理html结构,有且只有一个根标签 子组件可以复用,所以数据要组件化处理,data的 ...

  7. 基于ElementUI封装可复用的表格组件

    <template> <section class="ces-table-page"> <!-- 表格操作按钮 --> <section ...

  8. [Python自学] day-18 (1) (JS正则、第三方组件)

    一.JS的正则表达式 JS正则提供了两个方法: test():用于判断字符串是否符合规定: exec():获取匹配的数据: 1.test() 定义一个正则表达式: reg = /\d+/; // 用于 ...

  9. Friend-Graph (HDU 6152)2017中国大学生程序设计竞赛 - 网络选拔赛

    Problem Description It is well known that small groups are not conducive of the development of a tea ...

  10. c++学习之单链表以及常用的操作

    新学数据结构,上我写的代码. #include <iostream> #include <cstdlib> using namespace std; typedef int E ...