centos7.5常见的mysql方式

mysql8.x版本

在linux的centos7.5系统上安装mysql_centos7.5安装mysql-CSDN博客

mysql5.7 版本

​​​​​​​​​​​​​​CentOS 7.5系统安装使用Mysql 5.7数据库-阿里云开发者社区,其中需要补充以下两点:

1)如果安装mysql的时候报错Failing package is: mysql-community-client-5.7.40-1.el7.x86_64 GPG Keys are configured as,密钥过期,要按以下方法:

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

2)查询初始密码的时候如下:

复制代码
[root@VM-2-185-centos bin]# grep 'temporary password'  /var/log/mysqld.log
2023-12-05T05:45:29.627475Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: hTTS#V__H3xt

修改系统密码,授权一个账户远程访问。

复制代码
mysql> alter user root@"localhost" identified by 'Fan.88888';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on *.* to 'root'@'%' identified by 'Fan.88888' with grant option;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
相关推荐
卷Java19 分钟前
Linux服务器Docker部署OpenClaw:腾讯云/阿里云/VPS安装避坑指南
linux·运维·服务器
FirstFrost --sy2 小时前
MySQL关于表的操作
数据库·mysql
原来是猿2 小时前
Linux-【动静态库】
linux·运维·服务器
Y001112364 小时前
Day8-MySQL-多表查询-1
数据库·sql·mysql
九皇叔叔4 小时前
CentOS 7.5/RHEL 7.x 配置 YUM 源(阿里云镜像+本地源双方案)
linux·阿里云·centos
V1ncent Chen5 小时前
SQL大师之路 13 聚合函数和分组
数据库·sql·mysql·数据分析
chinesegf5 小时前
DNS 验证验证SSL证书
linux·服务器·网络
翻斗包菜6 小时前
MySQL 从入门到精通:数据库核心知识与实战指南
数据库·mysql
试试勇气6 小时前
Linux学习笔记(十七)--线程概念
linux·笔记·学习
LXY_BUAA6 小时前
《嵌入式操作系统》_高级字符设备驱动_20260316
linux·运维·服务器·驱动开发