Centos7 yum安装mysql5.7
发表于:2024-10-12 作者:千家信息网编辑
千家信息网最后更新 2024年10月12日,Centos 7中将MySQL数据库软件从默认的程序列表中移除,用mariadb代替。也就是说不能再跟之前6一样,直接使用yum进行安装,需要使用官网提供的软件源进行安装,此次安装版本为5.71. 安
千家信息网最后更新 2024年10月12日Centos7 yum安装mysql5.7
Centos 7中将MySQL数据库软件从默认的程序列表中移除,用mariadb代替。
也就是说不能再跟之前6一样,直接使用yum进行安装,需要使用官网提供的软件源进行安装,此次安装版本为5.7
1. 安装官网提供的yum源
# wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm# rpm -ivh mysql57-community-release-el7-11.noarch.rpm
2. 安装MySQL
# yum -y install mysql-server
3. 修改Mysql配置文件
[root@host-192-168-8-37 ~]# vim /etc/my.cnf[mysqld]character-set-server=utf8
4. 启动MySQL
q 启动MySQL
[root@master ~]# systemctl start mysqld
q 设置MySQL为开机启动
[root@master ~]# systemctl enable mysqld
5. 修改密码&进入MySQL数据库
Mysql5.7版本及之后不再使用空密码,在安装时会生成临时密码并保存在日志文件中
[root@host-192-168-8-37 ~]# grep 'password' /var/log/mysqld.log 2017-10-16T02:12:56.016829Z 1 [Note] A temporary password is generated for root@localhost: #zua)gQ?e5Gi
这里将用户的密码修改为:Mysql_password123
[root@host-192-168-8-37 yum.repos.d]# mysql -u root -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 5Server version: 5.7.19
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> alter user 'root'@'localhost' identified by 'Mysql_password123';Query OK, 0 rows affected (0.00 sec) mysql>
6. 配置MySQL
q 创建数据库(数据库名称:cache_cloud;编码:UTF-8)
mysql> create database cache_cloud default charset utf8;Query OK, 1 row affected (0.00 sec) mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || cache_cloud || mysql || performance_schema || sys |+--------------------+5 rows in set (0.01 sec) mysql>
密码
数据
数据库
文件
版本
软件
配置
中将
也就是
也就是说
名称
日志
用户
程序
编码
UTF-8
生成
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
软件开发企业还是个体
网页数据库框架
服务器怎么自动备份
血吼数据库
生态网络技术产业化
打印服务器格式不能锁定
平安寿险软件开发招聘
java开发在线数据库设计
北京白瑞互联网科技有限公司
软件开发便携主机
山西浪潮服务器维修哪家便宜
软件开发延期纠纷
网络技术专利属于哪个国家
科技互联网企业宣传片文案
游戏开发用的服务器
电影院售票数据库管理
深圳酷比 软件开发
美国国务院设立网络安全局
脚本语言与服务器
网络安全与反邪
数据库课程设计摘要
服务器接入端口有哪些
国际网络安全大赛女成员
万象归一数据库密码
mysql切换数据库格式
网络安全创意画简单又好看
淘宝服务器双图最新2022
网络安全建设绩效
深圳酷比 软件开发
前线信息网络技术有限公司